Localization Files

From HEWIKI
Revision as of 21:35, 7 November 2012 by HE-Nate (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Overview

All HeroEngine Localization files:


Localization File Sections


DEV-mode Localization files


DEV-Mode Configuration File

The DEV-mode configuration file contains six required sections plus one [universe_#] section per universe:

[file] - This section defines the file's type and format revision, valid keys in this section are:
type - type in this case is "configuration"
format_revision - currently format is at revision 1

 

[meta] - This section contains arbitrary key/value pairs that are accessible to script. Keys must be unique within the scope of the [meta] section, and each "Key*=Value*" line must contain one and only one "=" sign.
Key1=Value1
Key2=Value2

 

[configuration] - This section stores the configuration data for the localization system including the paths to the development and runtime configurations and the count of universes defined.
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

 

[locales] - List of the locale names used by this configuration. All locales in every universe in this configuration must be present in this list.

 

[universe_#] - The next sections contain N text universe definitions, each section is named universe_ and a monotonically ascending universe number starting with 1. (e.g. universe_1, universe_2, etc)
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.

 

[development_parameters] - This section contains parameters controlling the development environment in the format Parm=Setting.
Parm1=Setting
Parm2=Setting

 

[runtime_parameters] - This section contains parameters controlling the run-time environment in the format Parm=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).


[file] - This section defines the file's type and format revision, valid keys in this section are:
type - type in this case is "universe"
format_revision - currently format is at revision 1

 

[meta] - This section contains arbitrary key/value pairs that are accessible to script. Keys must be unique and keys/values may be any printable UTF-8 character except =
Key1=Value1
Key2=Value2

 

[universe] - This section describes the text universe, expected keys in this section are:
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.

 

[locales] - List of the locale names used by this universe. All locales in this list must be present in the parent configuration file's [locales] section, and all locales in every string ta in this configuration must be present in this list.

 

[development_table_#] - N development table sections named development_table_ and a monotonically ascending table number starting with 1. The description of a development table in the text universe has the following keys:
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

 

[runtime_table_#] N run time table sections named development_table_ and a monotonically ascending table number starting with 1.The description of a development table in the text universe has the following keys:
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.

[file] - This section defines the file's type and format revision, valid keys in this section are:
type - type in this case is "table"
format_revision - currently format is at revision 1
[meta] - This section contains arbitrary key/value pairs that are accessible to script. Keys must be unique and keys/values may be any printable UTF-8 character except =
Key1=Value1
Key2=Value2
[development_table] - The description of this development table has the following keys:
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
[string_#] - N localized string sections named string_ and an ID
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


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.
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox