Internationalization: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Tels (talk | contribs)
add link
Tels (talk | contribs)
add stubs
Line 1: Line 1:
This article deals with the localisation/translation of both TDM itself, as well as [[Fan Missions]].
This article deals with the localisation/translation of both TDM itself, as well as [[Fan Missions]].


{{red|TODO}}
== For Users ==


== CVARs ==
== CVARs ==


The D3 CVAR '''sys_lang''' is restricted to a few hard-coded values, and is thus not usable. We have added a new CVAR '''tdm_lang''', which contains the current language as English lower-case string, e.g. "english", "german", "portuguese" etc.
The D3 CVAR '''sys_lang''' is restricted to a few hard-coded values, and is thus not usable. We have added a new CVAR '''tdm_lang''', which contains the current language as English lower-case string, e.g. "english", "german", "portuguese" etc. This variable is controlled by the GUI via a call back into the SDK code, which switches the language underneath, and also reloads the GUI.
 
{{infobox|If you change the CVAR manually (via the console f.i.), you need to restart TDM so it works!}}
 
== For Mappers ==
 
{{red|Coming soon}}
 
=== FM specific dictionaries ===
 
=== Inventory Item Names with multiple lines ===
 
If you have an inventor item name which is very long, you can insert '''\n''' to split it up into two (but not more!) lines:
 
"inv_name" "This is a very very\nlong item name."
 
You should try in game how it looks, so that both lines are roughly the same length.
 
== For Developers ==
 
{{red|Coming soon}}
 
The main translation object is of the class CI18N (which is short for "Class Internationalization") and lives in ''Darkmod/I18N.cpp'' and ''Darkmod/I18N.h''.
 
 
== Known bugs ==
 
Sadly, there are quite a lot of limitations in the D3 SDK that prevent a few things from fully working. Once D3 goes open source, these things will be fixed, in the meantime we hope that you can live with the quirks.
 
{{red|TODO}}


== See also ==
== See also ==

Revision as of 18:57, 18 August 2011

This article deals with the localisation/translation of both TDM itself, as well as Fan Missions.

For Users

CVARs

The D3 CVAR sys_lang is restricted to a few hard-coded values, and is thus not usable. We have added a new CVAR tdm_lang, which contains the current language as English lower-case string, e.g. "english", "german", "portuguese" etc. This variable is controlled by the GUI via a call back into the SDK code, which switches the language underneath, and also reloads the GUI.

If you change the CVAR manually (via the console f.i.), you need to restart TDM so it works!

For Mappers

Coming soon

FM specific dictionaries

Inventory Item Names with multiple lines

If you have an inventor item name which is very long, you can insert \n to split it up into two (but not more!) lines:

"inv_name" "This is a very very\nlong item name."

You should try in game how it looks, so that both lines are roughly the same length.

For Developers

Coming soon

The main translation object is of the class CI18N (which is short for "Class Internationalization") and lives in Darkmod/I18N.cpp and Darkmod/I18N.h.


Known bugs

Sadly, there are quite a lot of limitations in the D3 SDK that prevent a few things from fully working. Once D3 goes open source, these things will be fixed, in the meantime we hope that you can live with the quirks.

TODO

See also