![]() |
Nuclide
Software Development Kit for id Technology (BETA)
|
By default the client (and menu) loads both resource/gameui_[LANG].txt
, but only the client looks for resources/[GAME]_[LANG].txt
.
The client or menu game code is allowed to call Locale_AddFile() to add new resource files to the localization table.
The localization table gets re-loaded upon a renderer restart, such as when invoking vid_reload
.
While the engine has its own localization support with .po files, they're unfortunately not of any use with dynamically typed strings.
So we built a system that's more or less compatible with whatever Valve does in Source. It uses hash tables for fast look-ups.
The engine attempts to set lang
to the operating system's appropriate locale. We then do a look-up, falling back to english
as the suffix for our resource files.
Language | POSIX Locale | Resource Suffix |
---|---|---|
Brazilian | pt_BR | brazilian |
Bulgarian | bg_BG | bulgarian |
Czech | cs_CZ | czech |
Danish | da_DK | danish |
Dutch | nl_NL | dutch |
English | en_US | english |
Finnish | fi_FI | finnish |
French | fr_FR | french |
German | de_DE | german |
Greek | el_GR | greek |
Hungarian | hu_HU | hungarian |
Italian | it_IT | italian |
Japanese | ja_JP | japanese |
Korean | ko_KR | koreana |
Norwegian | no_NO | norwegian |
Polish | pl_PL | polish |
Portuguese | pt_PT | portuguese |
Romanian | ro_RO | romanian |
Russian | ru_RU | russian |
Simplified Chinese | zh_CN | schinese |
Spanish | zh_TW | spanish |
Swedish | sv_SE | swedish |
Thai | th_TH | thai |
Traditional Chinese | zh_TW | tchinese |
Turkish | tr_TR | turkish |