Translator¶
The role of a Translator is to manufacture/return strings localized for the viewing player.
Not implemented yet
This class exists in the current Roblox API but is not implemented in Nova yet. Scripts that reference it will fail at runtime.
Description¶
The role of a Translator is to manufacture/return strings localized for the viewing player. It can be used to retrieve display-ready localized text from a LocalizationTable. The source of the Translator.LocaleId property, the set of tables it will search, and the order it will search them in depends on which method was used to create the Translator instance.
The input for a Translator is the original development language string and a context, where all or part of the context can be used to find a more precise/situational translation for the source string.
The Translator can also be used to manufacture translated strings with inserts (data replacements) which may change order based on the target language.
Inheritance¶
Object → Instance → Translator
Properties¶
| Member | Signature | Summary |
|---|---|---|
LocaleId |
LocaleId: string |
The locale of translated strings. |
Methods¶
| Member | Signature | Summary |
|---|---|---|
FormatByKey |
Translator:FormatByKey(key: string, args: Variant): string |
Returns the localized text string in a LocalizationTable based on its Translator locale, by key. |
RobloxOnlyTranslate |
Translator:RobloxOnlyTranslate(context: Instance, text: string): string |
— |
Translate |
Translator:Translate(context: Instance, text: string): string |
Returns the localized text string in a LocalizationTable based on its Translator locale, by source lookup. |
Roblox reference: Translator
Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.