Gets local translator for player
npm install @quenty/clienttranslator --save
Usage is designed to be simple.
- Call Translate(data, "blah") on anything
- Translation is magically replicated to clients and can be saved
- Only one place needed to save the data
Add files to ReplicatedStorage/i18n. Files will be in string values, and be valid JSON. This allows lookup like this:
{
"key": {
"secondary": {
"node": "My translated value"
}
}
}
This will generate an entry like this:
"key.secondary.node" --> My translated value
Which can be output like this:
ClientTranslator:FormatByKey("key.secondary.node") --> My translated value
All substitutions and other formats work like Roblox's does.
There exists a pseudo-locale qlp-pls
which can be to visualize pseudo-localized text. This can be used to help detect unlocalized text.
Initializes a new instance of the ClientTranslatorFacade.
Works the same way that Roblox's ClientTranslator:FormatByKey functions. However, functions when not online, and also will utilize a pseudo-locale.