Native Language Support

From K-3D

Jump to: navigation, search


Beginning with version 0.5, K-3D provides Native Language Support using the GNU gettext library. This article describes how users can specify their preferred language for the K-3D user interface. If you are a developer needing information on how to write code that can be translated into languages other than English, see Internationalization. If you are interested in adding a new language translation to K-3D, see Localization.

Locale Setup (GNU/Linux only)

On glibc-based (i.e. non-Win32) systems, some configuration is required to use a new locale. In particular, you will have to configure a "Swedish Chef" locale before you can use the "chef" translation included with K-3D for testing. To do so, you will need root access to create a "chef" locale on the local machine:

$ sudo localedef -i /usr/share/i18n/locales/en_US chef

Locale Specification (All Platforms)

Enjoy K-3D in the "Swedish Chef" locale!

To specify your preferred locale (language translation), set the environment variable "LANG" to the desired locale code, then run K-3D. For example, to use the "Swedish Chef" locale included with K-3D for testing purposes:

$ LANG=chef k3d

Once the program starts, you will see that the entire user appears in "Swedish Chef" instead of English. Note that developers can also set LANG to test locales from the K-3D build directory without installation:

$ cd ~/k3d-build
$ LANG=chef make run
Personal tools