Difference between revisions of "Translation"

From Minetest Developer Wiki
Jump to navigation Jump to search
m
(update links)
Line 1: Line 1:
  
 
== Quick start ==
 
== Quick start ==
Translations of Minetest are automated using weblate at [http://translate.minetest.ru/projects/minetest/core/ here].
+
Translations of Minetest are automated using weblate at [https://hosted.weblate.org/projects/minetest/minetest/ here].
  
 
In case you wish to translate a new language, [[How to communicate|contact a core dev]].
 
In case you wish to translate a new language, [[How to communicate|contact a core dev]].
Line 17: Line 17:
 
To create a new translation, one must create a directory named after the [http://www.mathguide.de/info/tools/languagecode.html language code], creating a copy of the <code>po/minetest.pot</code> file as <code>po/''LANG''/minetest.po</code>, and translating the original english text into your language; then <code>cmake</code> will detect it and <code>make</code> builds the language.
 
To create a new translation, one must create a directory named after the [http://www.mathguide.de/info/tools/languagecode.html language code], creating a copy of the <code>po/minetest.pot</code> file as <code>po/''LANG''/minetest.po</code>, and translating the original english text into your language; then <code>cmake</code> will detect it and <code>make</code> builds the language.
  
However, it is recomended to contact a core dev to create the .po file for you language and then use [http://translate.minetest.ru/projects/minetest/core/ weblate] to translate.
+
However, it is recomended to contact a core dev to create the .po file for you language and then use [https://hosted.weblate.org/projects/minetest/minetest/ weblate] to translate.
 
[[Category:Core Engine]]
 
[[Category:Core Engine]]

Revision as of 23:07, 7 July 2015

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 cmake will detect it and make builds the language.

However, it is recomended to contact a core dev to create the .po file for you language and then use weblate to translate.