A Fantasy Farming: Orange Season's mod to allow the translation of the game to other languages.
- GettextFormatter
Class used to encode and decode gettext data.
- JsonFormatter
Class used to encode and decode JSON data.
Class used to encode and decode gettext data.
Kind: global class
- GettextFormatter
- .ext
- .encode(data) ⇒
string
- .decode(data) ⇒
Object.<string, string>
Kind: static property of GettextFormatter
Properties
Name | Type | Default | Description |
---|---|---|---|
ext | Object |
List of extensions used by the formatter file types. | |
ext.source | string |
"pot" |
The file extension of the template data. |
ext.main | string |
"po" |
The file extension of the translations data. |
Encode the translation data to the gettext format.
Kind: static method of GettextFormatter
Returns: string
- The gettext formatted data.
Param | Type | Description |
---|---|---|
data | Object.<string, string> |
A list with source and target for each translation as key and value. |
Decode the translation data in the gettext format.
Kind: static method of GettextFormatter
Returns: Object.<string, string>
- An object with source and target translations as key and
value.
Param | Type | Description |
---|---|---|
data | string |
The gettext encoded translation data. |
Class used to encode and decode JSON data.
Kind: global class
- JsonFormatter
- .ext
- .encode(data) ⇒
string
- .decode(data) ⇒
Object.<string, string>
Kind: static property of JsonFormatter
Properties
Name | Type | Default | Description |
---|---|---|---|
ext | Object |
List of extensions used by the formatter file types. | |
ext.source | string |
"json" |
The file extension of the template data. |
ext.main | string |
"json" |
The file extension of the translations data. |
Encode the translation data to the JSON format.
Kind: static method of JsonFormatter
Returns: string
- The JSON formatted data.
Param | Type | Description |
---|---|---|
data | Object.<string, string> |
A list with source and target for each translation as key and value. |
Decode the translation data in the JSON format.
Kind: static method of JsonFormatter
Returns: Object.<string, string>
- An object with source and target translations as key and
value.
Param | Type | Description |
---|---|---|
data | string |
The JSON encoded translation data. |