Difference between revisions of "Translation"

From Minetest Developer Wiki
Jump to navigation Jump to search
(Created page with " == Overview == Minetest uses the '''gettext''' library for translation of game text. The locales available are detected as part of the build process, as well as the creation ...")
 
Line 1: Line 1:
  
 
== Overview ==
 
== Overview ==
Minetest uses the '''gettext''' library for translation of game text. The locales available are detected as part of the build process, as well as the creation of ''message catalogs''.
+
Minetest can use the '''gettext''' library to translate in-game text. To enable internationalization support, the game must be built with the <code>-DENABLE_GETTEXT=1</code> option to <code>cmake</code>.
  
 
== Language detection ==
 
== Language detection ==
Line 7: Line 7:
  
 
== Available translations ==
 
== Available translations ==
The available translations are found in source form in the <code>po/</code> directory, and are built as part of the build process.
+
The available translations are found in source form in the <code>po/</code> directory. The <code>cmake</code> detects them, and they are built as part of the build process.

Revision as of 21:13, 19 January 2013

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, you must define the variable manually[how?]

.

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.