selene.i18n
Provides access to localization messages within bundles.
| Function |
|---|
Get(key: string): string | nilGet(key: string, locale: Locale): string | nil |
Retrieves a message for the given locale.
If no locale is given, the default locale will be used.
If the key is not defined, this function will return nil. |
Format(key: string): string | nilFormat(key: string, args: args): string | nilFormat(key: string, args: table | nil, locale: Locale): string | nil |
Retrieves a message for the given locale and replaces its placeholders with the given arguments.
If no locale is given, the default locale will be used.
If the key is not defined, this function will return nil. |
HasKey(key: string): booleanHasKey(key: string, locale: Locale): boolean |
Checks whether a key is defined in a localization bundle for the given locale.
If no locale is given, the default locale will be used. |