Open Asterune
Translator

Translator

Looks up localized text for a selected locale.

Behavior

Obtain a Translator from LocalizationService.Translator or LocalizationService:TranslatorFor(localeOrPlayer). The value reads translation tables registered in the current runtime.

Summary

Members6
Properties3
Methods3
  • Text(key: string, args: { [string]: any }?): string

    Looks up a translation key and substitutes named arguments.

  • Find(key: string, args: { [string]: any }?): string?

    Looks up a translation key and substitutes named arguments.

  • IsA(className: string): boolean

    Returns true for "Translator" or "Instance".

Properties

Locale

Translator.Locale: string

The locale identifier selected for this Translator.

ClassName

Translator.ClassName: string

The string "Translator".

Name

Translator.Name: string

The string "Translator".

Methods

Text

Translator:Text(key: string, args: { [string]: any }?): string

Looks up a translation key and substitutes named arguments. Returns the key itself when no translation is found.

Find

Translator:Find(key: string, args: { [string]: any }?): string?

Looks up a translation key and substitutes named arguments. Returns nil when no translation is found.

IsA

Translator:IsA(className: string): boolean

Returns true for "Translator" or "Instance".

Used by

LocalizationService

LocalizationService · TranslationTable