we ball I guess
This commit is contained in:
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Copyright (c) 2026 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
/** Locale string lookup and language switching. */
|
||||
interface LocaleNamespace {
|
||||
/**
|
||||
* Returns the translated string for the given message ID.
|
||||
*
|
||||
* @param id - PO message ID, e.g. `"ITEM_POTION_NAME"`.
|
||||
* @param pluralCount - Optional count used to select the plural form.
|
||||
* Defaults to 1 (singular).
|
||||
* @param args - Optional substitution values (`%s`, `%d`, `%f`).
|
||||
*/
|
||||
getText(
|
||||
id: string,
|
||||
pluralCount?: number,
|
||||
...args: Array<string | number>
|
||||
): string;
|
||||
|
||||
/**
|
||||
* Switches the active locale.
|
||||
* @param name - Locale name string, e.g. `"en-US"`.
|
||||
*/
|
||||
setLocale(name: string): void;
|
||||
}
|
||||
|
||||
declare var Locale: LocaleNamespace;
|
||||
Reference in New Issue
Block a user