KNOT Localization is a lightweight, scalable and extensible texts & assets localization system for Unity.
Uses traditional key-value pair collection as a source data structure along with convenient user-friendly interface to access localizable data in one place without having to manually synchronize keys and switch between localization source files.
For game designers, it keeps editor workflow as simple as possible: Add Key > Set localized Value > Add Key Reference > Done!
For programmers, it has modular architecture with the possibility to implement custom Texts & Assets data sources, runtime data loading & unloading logic (including remote), editable as property & runtime accessible metadata and even the whole localization manager without modifying the codebase.
Compatible with all platforms.
Full Editor Undo / Redo support.
Well organized and commented source code without custom dependencies.
Here is the backstory of KNOT Localization. We were working on a project that has to be localized into several languages. In the beginning, localized values were stored as a simple key-value dictionary in ScriptableObject assets. It worked well until the project has started to grow.
1. We were targeting multiple platforms and builds. For example, build A and build B had both their own and the same general localized values. Solved by introducing a Database with references to localization resources. Database can be easily changed trough Project Settings, during runtime or build time to support CI/CD.
2. At some point, we needed to load some of the localized values from a remote server with live update feature for translators. Solved by introducing Collection Providers.
3. To make it easier to keep a reference to localized values and get rid of code embedded key references, we introduced Key Reference. It’s an object that can be serialized and stored anywhere.
TextMeshPro support is partially done. I’ve attached the package that contains TMPro localized component (KNOT Localization > Localized Text Mesh PRO). It will be included in the next update.
All localized components has a single key keference, but you can set it manually via script. Here is a simple example:
public class Test : MonoBehaviour
{
public int TestKeyId;
public KnotTextKeyReference[] TestKeys;
public KnotLocalizedUIText LocalizedText;
void Awake()
{
LocalizedText.KeyReference = TestKeys[TestKeyId];
}
}
Hi! I have some questions, but I’ll start with this one: what’s exactly a knot asset (you know, we got Languages, Text, and Assets)? So, it’s not clear to me what is its purpose, or correct usage, and the documentation doesn’t seem to explain it either.
Unity’s localization package has not been updated for a long time. Looks like it was abandoned.
I’m actively using Knot Localization in my ongoing projects without issues so I see no need for updates at the moment. If you found a bug or have any suggestions feel free to reply here.
Hi! So, I just noticed on the asset store page that you can (apparently) create folders to organize Text Keys. But I couldn’t find anything about on how to create those folders. Are they just Asset Key Collections?
Oh, well, I figured it out. The answer was literally on that specific screenshot on the asset store (never thought about it honestly). So it turns out that you have to write Folder.KeyReference, where:
Folder is the folder name
KeyReference is the key reference name
You can add as many folders as you want (Folder.Subfolder.SubsubFolder, and so on). The last keyword on the string will be the key reference (always).