register_language#
- omni.kit.language.core.scripts.register_language(
- locale_info: tuple,
- font_path: str,
- font_scale: float,
- regions: list[str],
- pangram: str,
- font_overresolution_size: float = None,
Registers a new language.
This function added a new language to the pool of known languages and then attempts to switch to the new language if current locale_id matches given locale_id.
- Parameters:
locale_info (tuple) – contains locale_id, language name and localized language name.
font_path (str) – path to a font file that will be used instead of default font.
font_scale (float) – additional scaling to font.
regions (list[str]) – list of region files that contain the characters to be used. See kit/source/extensions/omni.kit.renderer.imgui/data/regions/ for an example.
pangram (str) – string containing all the letters in the alphabet. EG. “The quick brown fox jumps over the lazy dog”.
font_overresolution_size (float) – override largest font size from default 100. Useful for large font ranges.
- Returns:
True on success or False in error.