Changes between Version 3 and Version 4 of documentation/Localisation
- Timestamp:
- 03/13/08 17:31:23 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
documentation/Localisation
v3 v4 45 45 }}} 46 46 47 If we were to localise Rocket Invaders, we'd want to move all of the strings out from the RML and into a string table. The raw text in the RML would then be replaced with the string table tokens:47 If we were to localise Rocket Invaders, we'd want to move all of the English strings out from the RML and into a string table. The raw text in the RML would then be replaced with the string table tokens: 48 48 49 49 {{{ 60 60 }}} 61 61 62 Our sample translator would then become:62 Assuming the appliation has a StringTable class that has loaded the appropriate string table for the language, our sample translator would then become: 63 63 64 64 {{{ 75 75 }}} 76 76 77 And now (assuming the application's StringTable::GetString() returns the appropriate string) the strings will be valid for whatever language we specify a string table for. Note that you can place RML into the translated string, and it will be parsed appropriately. For example, you could replace a token with an <img> tag to render an icon for a controller button. 77 Now the strings will be valid for whatever language we specify a string table for. In practice, you might need a more sophisticated translator that could replace multiple tokens within a string. 78 79 Note that you can place RML into the translated string, and it will be parsed appropriately. For example, you could replace a token with an <img> tag to render an icon for a controller button. 78 80 79 81 == Font charsets ==