LocalizationSystem Lite
What is it?
LocalizationSystem Lite is a lightweight Godot 4 localization solution made by Poty. It manages a single CSV file from inside Godot and uses Godot's built-in TranslationServer at runtime. It is a good fit for prototypes and proof of concepts: enable the plugin, add your text keys, reimport the CSV, and use the generated translations in your game.
For the Pro version and more, go to:
https://ptupi.itch.io/
Lite features:
- CSV editor inside Godot
- Starting CSV file included
- Add, rename, and remove languages
- Add, rename, and remove translation keys
- Edit translation values inline
- Search keys and translation values
- Auto-save CSV changes
- Manual CSV reimport button
- Automatic Project Settings translation-file synchronization
- Uses Godot's built-in
TranslationServer - Runtime language switching
- Example scene to help you get started quickly
Setup
- If you downloaded the project from GitHub, copy
addons/localization_system_liteinto your project'saddonsfolder. - Enable the plugin.
- Go to Project > Project Settings > Plugins and enable LocalizationSystemLite.
- The plugin adds the
LocalizationSystemautoload and synchronizes the generated translation files under Project Settings > Localization > Translation files.
- Open the Localization dock at the bottom of the editor and select CSV Manager.
- The main localization file is always:
Its first column is
res://addons/localization_system_lite/localization/localization.csvKEYS; every remaining column is a Godot locale tag, such asen,pt-BR, orzh-CN. - Use the manager to add or edit languages, keys, and values. Click Reimport CSV after changes so Godot regenerates the
.translationresources used at runtime.
CSV Manager
Columns represent languages and rows represent translation keys. The manager saves edits directly to localization.csv.
- Use the pencil icon to edit a language, key, or translated value.
- Use the trash icon to remove a language or key. Removing a language also removes all of its values.
- Use the add controls to create languages and keys.
- Use the search field to filter by key or translated text.
- Press
Escwhile editing to discard inline changes. PressEscagain when nothing is being edited to close the manager.
When a language is removed, its generated localization.<locale>.translation resource is removed on refresh. The plugin also keeps its generated translation resources synchronized with Project Settings > Localization > Translation files while enabled.
Usage
Use translation keys in the Inspector's Text property for supported controls such as Label, Button, and RichTextLabel.
MENU_PLAY
For a RichTextLabel, enable BBCode Enabled and use a translation key as its text. Your CSV value may contain BBCode:
Welcome to [b][color=#8ecbff]LocalizationSystem[/color][/b]!
For text assigned through code, use the LocalizationSystem autoload:
@onready var title_label: Label = %TitleLabel
func _ready() -> void:
title_label.text = LocalizationSystem.translate("MENU_PLAY")
Change the current language at runtime with its locale tag:
func _on_portuguese_button_pressed() -> void:
LocalizationSystem.set_locale_value("pt-BR")
func _on_english_button_pressed() -> void:
LocalizationSystem.set_locale_value("en")
You can also use Godot's built-in tr() function wherever it fits your project:
title_label.text = tr("MENU_PLAY")
Example
To run the included example, set addons/localization_system_lite/examples/scenes/main.tscn as the main scene.
- Right-click the scene and choose Set as Main Scene.
- Run the project.
- Use the en and pt-BR buttons to switch the locale at runtime.
Changelog for version 1.0.0
No changelog provided for this version.