A minimal JSON-Based localization tool for Unity – Designed for small projects. [v0.8.0] This tool currently supports static text only. Variables, plurals, and advanced formatting are not implemented yet.
This project is made/test under Unity 6.3 (6000.3.1f1)
You can easily test it via the latest demo build here
- Simple JSON-based localization
- Runtime language switching
- Automatic fallback to a default language
- TextMeshPro support via
LocalizedTextcomponent - Robust loading, audit, and configurable logging
- Copy the
UnityLiteL10nfolder into your project under:
Assets/Plugins/
- Ensure your localization files are placed in:
Resources/Localization/
-
Add a
LocalizationManagercomponent to a GameObject in your scene. -
Set:
DefaultLanguage(e.g.EN)CurrentLanguage(e.g.EN)
- Optional: Configure debugging settings:
missingKeyFormat(default: "[{0}]") for how missing keys are displayedDuplicateKeyPolicy(Overwrite, KeepFirst, Error)LogLevel(None, ErrorsOnly, Warnings, Verbose)strictMode(enable to throw errors on invalid JSON / missing languages)PerformFullAudit(perform post-load audit of all languages against the default language)
LocalizationManagerinspector – all debug and validation settings are centralized here.
Each language file is a simple JSON file:
{
"entries": [
{ "key": "menu.test", "value": "EN" },
{ "key": "menu.play", "value": "PLAY" },
{ "key": "menu.settings", "value": "SETTINGS" },
{ "key": "menu.quit", "value": "QUIT" }
]
}
- The filename (e.g. EN.json, FR.json) is used as the language code.
- JSON entries must now be valid and non-null; empty files will trigger warnings or errors in strictMode
- Add a TextMeshProUGUI to your UI.
- Add the
LocalizedTextcomponent. - Set the localization key (e.g.
menu.play).
The text will automatically update when the language changes.
LocalizationManager.Instance.SetLanguage("FR");
All subscribed LocalizedText components will update automatically.
LocalizationManager.Instance.Reload();
- Clears cached missing keys
- Reloads all JSON files from
Resources/Localization/ - Triggers update events for all
LocalizedTextcomponents
This is useful when updating files on the fly.
UnityLiteL10n provides optional validation tools to help detect:
- Missing localization keys
- Invalid or empty JSON files
- Duplicate keys
- Empty keys
- Extra keys
These tools are configurable via the LocalizationManager. Full debugging features are documented here
A demo build is available in: UnityLiteL10n/releases
- For Windows users.
- No Unity, no setup required. You can test the tool directly.
A demo scene is available in:
Demo/LocalizationDemo.unity
It showcases:
- Runtime language switching
- Multiple localized UI elements
- JSON-based loading
For JA/KO languages, you will need to assign them as fallbacks in your main (Latin) font. You will find the fonts under
Demo/Fonts/.asset
- This tool currently supports static text only.
- Variables, plurals, and advanced formatting are not implemented yet.
- For more information about the version, please refer to the changelog section.
- This project is licensed under the MIT License. See the LICENSE file for details.
- For more information on debugging tools, go to the DebugFeatures file.
- More details in the FAQ.
- Text variables (e.g.
{playerName}) - Basic editor helpers
- Optional advanced localization features
For issues, suggestions, or contributions, feel free to open an issue on the GitHub repository.
