Lightweight localization library. Supports string and assets localization.
Primary installation method is using unity's pacakge manager.
- Create main configuration file using
Assets/L11/Create Config
option. - Create
LocalePreset
for each language you need to support. You can do this withAssets/Create/L11/Locale
menu option. - Add presets to configuration file
Each locale preset contains primary and external dictionaries. Primary is serialized along with preset, external can be created separataly and added to any preset.
Any string can be used as key and localized using extension method:
string value1 = "key1".Localize();
string value2 = "key2".Localize(fallback: "No value")
Almost all languages can use pluralization feature based on gettest plural rules.
// keys:
// "coins": "{0} {0:Coins|Coin}"
string value = "coins".Localize(1); // '1 Coin'
string value = "coins".Localize(1234); // '1234 Coins'
For now, it has just a few helper components:
When attached to object with TextMeshPro component, localizes it's text with selected key or fallback value
When attached to object with Image component, will use sprite based on selected key or fallback asset
Supports sync with POEditor with plugin https://github.com/vape/L11-POEditor