Nuclide
Software Development Kit for id Technology (BETA)
Loading...
Searching...
No Matches
Localization

Overview

Nuclide has its own system to handle localized text.

While the engine has its own localization support with .po files, they're unfortunately not of any use with dynamically typed strings.

Usage

Strings that are meant to represent localized text start with the # character. You'll find examples such as `#UI_ACCEPT". Only the client and server actually handle localized text right now. That is by design to ensure best practices are followed, for now. @section autotoc_md800 Resouce Files By default the client (and menu) loads both <tt>resource/gameui_[LANG].txt</tt>, but only the client looks for <tt>resources/[GAME]_[LANG].txt</tt>. The client or menu game code is allowed to call Locale_AddFile() to add new resource files to the localization table. The localization table, generated form said resource files, gets re-loaded upon a renderer restart. Invoking <tt>vid_reload</tt> via console can accomplish this, for example. @section autotoc_md801 Setting locale The engine attempts to set the <tt>lang</tt> console variable to the operating system's appropriate locale by default. We then do a look-up, falling back to <tt>english</tt> as the suffix for our resource files. @section autotoc_md802 Language Table <table class="markdownTable"> <tr class="markdownTableHead"> <th class="markdownTableHeadNone"> 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