For AI agents: the complete documentation index is available at /AchEngine/en/llms.txt, the full documentation bundle is available at /AchEngine/en/llms-full.txt, and this page is available as Markdown at /AchEngine/en/usage/localization/codegen.md.

Key Constant Code Generation

The Localization editor can generate a nested static class from dot-separated keys.

Conversion example

{
  "menu.start": "Start",
  "item.sword.name": "Iron Sword"
}
L.Menu.Start
L.Item.Sword.Name

The generated constants are ordinary strings, so they can be passed directly to LocalizationManager.Get.

Code-generation settings

Configure the following fields on LocalizationSettings:

FieldDescription
generatedClassNameRoot class name; defaults to L
generatedNamespaceOptional namespace
generatedOutputPathC# output path
DatabaseLocale database used to collect keys

Run AchEngine › Localization › Generate Key Class after changing the database.

LocalizedString

Use LocalizedString when a field should expose a key dropdown in the Inspector.

[LocalizedString]
[SerializeField] private LocalizedString _title;

private void Refresh()
{
    titleText.text = _title.Value;
}