Awesome Open Source
Awesome Open Source

Babel Godot plugin

This is a plugin for Babel, the internationalization library, that adds support for scene files from the Godot game engine.

Installation

Install Babel and this plugin:

pip install Babel Babel-Godot

Usage

Using a mapping file like this:

[python: **.gd]
encoding = utf-8
extract_messages = tr

[godot_scene: **.tscn]
encoding = utf-8

[godot_resource: **.tres]
encoding = utf-8

you can extract messages to be translated from your .gd, .tres, and .tscn files using:

pybabel extract -F babel_mapping_file -k Label/text -k Resource/catchphrase -k tr -o translations.pot .

You can then create .po files from the POT catalog using Poedit, or online services such as Crowdin, Transifex, or Weblate.

See testproject/ in the repository for an example.



Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Python (805,485
Plugin (113,905
Scene (8,263
Babel (8,009
Localization (5,323
I18n (4,835
Catalog (4,471
Godot (2,774
Gettext (896
L10n (657