Difference between revisions of "Translation"

From Minetest Developer Wiki
Jump to navigation Jump to search
Line 9: Line 9:
  
 
== Language detection ==
 
== Language detection ==
Minetest detects the current language by inspecting the <code>LANG</code> environment variable. This is not a problem on Unix-based systems (such as GNU/Linux) since the system already defines this variable at login. On Windows platforms, you must define the variable manually{{how}}.
+
Minetest detects the current language by inspecting the <code>LANG</code> environment variable. This is not a problem on Unix-based systems (such as GNU/Linux) since the system already defines this variable at login. On Windows platforms, the system language is used.
  
 
== Available translations ==
 
== Available translations ==

Revision as of 13:25, 31 January 2013

Quick start

Translations of Minetest are automated using weblate at here.

In case you wish to translate a new language, contact a core dev.

Overview

Minetest can use the gettext library to translate in-game text. To enable internationalization support, the game must be built with the -DENABLE_GETTEXT=1 option to cmake.

Language detection

Minetest detects the current language by inspecting the LANG environment variable. This is not a problem on Unix-based systems (such as GNU/Linux) since the system already defines this variable at login. On Windows platforms, the system language is used.

Available translations

The available translations are found in source form in the po/ directory. The cmake detects them, and they are built as part of the build process.

Contributing a new translation

To create a new translation, one must create a directory named after the language code, creating a copy of the po/minetest.pot file as po/LANG/minetest.po, and translating the original english text into your language; then one can either use the util/updatepo.sh script or let make take care of it on the next build.