Translator
class Translator
Properties
| static array | $translations |
Methods
static
init()
Initializes the translations by loading locale files from modules and the project folder.
static
find_translations(string $path)
Recursively loads locale files from a given path.
static string
translate(string $string, array $placeholders = [])
Translates a string using loaded translations and replaces placeholders.
Details
at line 16
static
init()
Initializes the translations by loading locale files from modules and the project folder.
at line 29
static
find_translations(string $path)
Recursively loads locale files from a given path.
at line 60
static string
translate(string $string, array $placeholders = [])
Translates a string using loaded translations and replaces placeholders.