Template:Lang/doc: Difference between revisions

Created doc for Lang template
 
No edit summary
Line 1: Line 1:
== Overview ==
== Overview ==
Template for retrieving localized strings from their relevant json file, such as `Data:Lang_en.json` for English. Note that localized strings are all pulled from raw game files.
Template for retrieving localized strings from their relevant json file, such as '''Data:Lang_en.json''' for English. Note that localized strings are all pulled from raw game files.


Supports search via the JSON '''key''' or by referencing it using the English '''label'''
Supports retrieval via the JSON '''key''' or by referencing it using the English '''label'''


=== Examples ===
=== Examples ===
Line 22: Line 22:
},
},
"lang_code": {
"lang_code": {
"description": "Two-letter language code for selecting language of string. Note that this should usually be used, as the lang code will be pulled from the URL subpage.",
"description": "Two-letter language code for selecting language of string. Note that this should not usually be used, as the lang code will be pulled from the URL subpage.",
"example": "en",
"example": "en",
"type": "string",
"type": "string",
Line 32: Line 32:
"type": "string"
"type": "string"
}
}
},
}
    "description": ""
}
}
</templatedata>
</templatedata>
<noinclude>[[Category:Template documentation]]</noinclude>
<noinclude>[[Category:Template documentation]]</noinclude>