Localization Files
Line 1: | Line 1: | ||
+ | [[category:Localization]] | ||
{{tocright}} | {{tocright}} | ||
Latest revision as of 21:35, 7 November 2012
|
Overview
All HeroEngine Localization files:
- Include file format revision numbers, to allow backward compatibility of file format changes.
- Include the file type within the contents of the file, to accommodate human error in renaming of files.
- Are saved in the repository with a leading UTF-8 byte-order mark (BOM) and DOS end-of-line markers (EOLs). However, third-party files can be uploaded to the repository and successfully loaded into the Localization system without UTF-8 BOMs, and with either DOS or Unix EOLs.
- Are human readable, to allow visual debugging.
- Are human writable (with care), to allow hand-patching and experimentation of programmatic generation of the data en masse.
- Use multiple sections and key-value storage, similar to Windows Private Profile (“.ini”) files.
Localization File Sections
DEV-mode Localization files
- Are stored in the /Localization/Development repository root folder by convention.
DEV-Mode Configuration File
The DEV-mode configuration file contains six required sections plus one [universe_#] section per universe:
type - type in this case is "configuration"
format_revision - currently format is at revision 1
Key1=Value1
Key2=Value2
name - arbitrary name assigned to this localization configuration
file - repository path to the development configuration file (this file)
runtime_file - repository path to the runtime configuration file to be generated from this file
universe_count - number of universes defined in this configuration file
name - arbitrary universe name
file - path to the development configuration file for the universe
runtime_file - path to the runtime configuration file for the universe
range_low - describes the lower bounds for the range of localized string IDs contained in this text universe, for customer text universes the valid range is 1 to 2^63 - 1. 0 is never valid. The bounds described by the range_lower and range_upper must not overlap with any other text universe.
range_high - describes the upper bounds for the range of localized string IDs contained in this text universe, for customer text universes the valid range is 1 to 2^63 - 1. 0 is never valid. The bounds described by the range_lower and range_upper must not overlap with any other text universe.
Parm1=Setting
Parm2=Setting
Parm1=Setting
Parm2=Setting
Example DEV-Mode Configuration File
[file]
type=configuration
format_revision=1
[meta]
Key=Value
AnotherKey=Value2
[configuration]
name=X
file=/Localization/Development/Configuration.loc_configuration
runtime_file=/Localization/Runtime/Configuration.loc_run_configuration
universe_count=2
[locales]
en-US
ja-JP
[universe_1]
name=Clean HeroEngine
file=/Localization/Development/HeroEngine.loc_universe
runtime_file=/Localization/Runtime/HeroEngine.loc_run_universe
range_low=-999999
range_high=-1
[universe_2]
name=Customer Base Universe
file=/Localization/Development/Customer.loc_universe
runtime_file=/Localization/Runtime/Customer.loc_run_universe
range_low=1
range_high=1000000000
[development_parameters]
Parm=Setting
[runtime_parameters]
Parm=Setting
DEV-Mode Universe File
DEV-mode universe files contain four required sections plus one [development_table_#] section for each DEV-mode string table file and one [runtime_table_#] section for each RT-mode string table. Note that RT-mode string tables may contain more than one RT-mode string table file (and usually do).
type - type in this case is "universe"
format_revision - currently format is at revision 1
Key1=Value1
Key2=Value2
name - arbitrary name assigned to this universe
file - path to the development universe file (this file)
runtime_file - path to the runtime universe file
base_locale - the base locale in which localized strings were generated, for games produced in the USA en-US is going to be normal. The specified base_locale must be one of the locales enumerated as valid in the configuration file.</font>
range_low - describes the lower bounds for the range of localized string IDs contained in this text universe, for customer text universes the valid range is 1 to 2^63 - 1. 0 is never valid. The bounds described by the range_lower and range_upper must not overlap with any other text universe. The range_low value must match the the value specified in the configuration file.
range_high - describes the upper bounds for the range of localized string IDs contained in this text universe, for customer text universes the valid range is 1 to 2^63 - 1. 0 is never valid. The bounds described by the range_lower and range_upper must not overlap with any other text universe. The range_high value must match the value in the configuration file.
development_table_count - the count of development tables in the text universe, this must match the actual tables described herein.
runtime_table_count - the count of run time tables in the text universe, this must match the actual tables described herein.
name - arbitrary name assigned to the table.
file - the path in which the development table file is found.
range_low - the lower bounds of localized string IDs found in this particular table
range_high - the upper bounds of localized string IDs found in this particular table
name - arbitrary name assigned to the table.
runtime_file - path to the runtime table file
<locale name> - the path in which the run time table file for a particular locale is found.
range_low - the lower bounds of localized string IDs found in this particular table
range_high - the upper bounds of localized string IDs found in this particular table
Example DEV-Mode Universe File
[file]
type=universe
format_revision=1
[meta]
Key=Value
Another=Value2
[universe]
name=Clean HeroEngine
file=Clean_HeroEngine.loc_universe
runtime_file=Clean_HeroEngine.loc_runtime_universe
base_locale=en-US
range_low=-999999
range_high=-1
development_table_count=1
runtime_table_count=1
[locales]
en-US
ja-JP
[development_table_1]
name=Clean HeroEngine Systems
file=/Localization/Development/HeroEngine/Clean_HeroEngine.loc_table
range_low=-999999
range_high=-1
[runtime_table_1]
name=Clean HeroEngine Systems
en_US=/Localization/Runtime/en_US/Clean_HeroEngine.loc_run_table
ja_JP=/Localization/Runtime/ja_JP/Clean_HeroEngine.loc_run_table
range_low=-999999
range_high=-1
DEV-Mode String Table File
A DEV-mode string table file is split into three fundamental sections and then a section for each localized string.
type - type in this case is "table"
format_revision - currently format is at revision 1
Key1=Value1
Key2=Value2
name - arbitrary name assigned to the table
range_low - the lower bounds of localized string IDs found in this particular table
range_high - the upper bounds for localized string IDs found in this table
context - information about the usage of this string
<locale name> - UTF-8 text translation in language specified by locale name
Example DEV-Mode String Table File
[file]
type=development_table
format_revision=1
[meta]
Key=Value
Another=Value2
[development_table]
name=Clean HeroEngine Systems
range_low=-999999
range_high=-1
[string_-123123]
context=This is the standard greeting used by programmers world-wide.
en-US=Hello, World.
ja-JP=宜しくお願い致します。
[string_-123124]
context=A melodramatic goodbye.
en-US=Goodbye, cruel world!
ja-JP=
RT-mode Localization files
- Are stored in the /Localization/Runtime repository root folder by convention.
RT-Mode Configuration File
[file] type=runtime_configuration format_revision=1 [runtime_configuration] universe_count=2 [locales] en_US ja_JP [runtime_universe_1] runtime_file=/Localization/Runtime/HeroEngine.loc_run_universe range_low=-999999 range_high=-1 [runtime_universe_2] runtime_file=/Localization/Runtime/Customer.loc_run_universe range_low=1 range_high=1000000000 [runtime_parameters] Parm=Setting
RT-Mode Universe File
[file] type=runtime_universe format_revision=1 [runtime_universe] base_locale=en_US range_low=-999999 range_high=-1 runtime_table_count=1 [locales] en_US ja_JP [runtime_table_1] en_US=/Localization/Runtime/en_US/HeroEngine.loc_run_table ja_JP=/Localization/Runtime/ja_JP/HeroEngine.loc_run_table range_low=-999999 range_high=-1
RT-Mode String Table File
[file] type=runtime_table format_revision=1 [runtime_table] range_low=-999999 range_high=-1 locale=en_US [strings] -123123=Good morning.