Line 1: |
Line 1: |
− | {{upcoming|1.6}}
| |
− |
| |
| ← [[Modding:Index|Index]] | | ← [[Modding:Index|Index]] |
| | | |
Line 76: |
Line 74: |
| |- | | |- |
| | <samp>[LocalizedText {{t|string key}}]</samp><br /><samp>[LocalizedText {{t|string key}} {{t|token values}}+]</samp> | | | <samp>[LocalizedText {{t|string key}}]</samp><br /><samp>[LocalizedText {{t|string key}} {{t|token values}}+]</samp> |
− | | Translation text loaded from the given [[Modding:Modder Guide/Game Fundamentals#String keys|string key]]. If the translation has placeholder tokens like <samp>{0}</samp>, you can add the values after the string key. | + | | Translation text loaded from the given [[Modding:Common data field types#Translation keys|translation key]]. If the translation has placeholder tokens like <samp>{0}</samp>, you can add the values after the string key. |
| |- | | |- |
| | <samp>[LocationName {{t|location ID}}]</samp> | | | <samp>[LocationName {{t|location ID}}]</samp> |
| | The translated display name for a location given its ID [[Modding:location data|in <samp>Data/Locations</samp>]]. | | | The translated display name for a location given its ID [[Modding:location data|in <samp>Data/Locations</samp>]]. |
| |- | | |- |
− | | <samp>[MovieTitle {{t|id}}]</samp> | + | | <samp>[MovieName {{t|id}}]</samp> |
− | | The translated display name for a movie from [[Modding:Movie theater data|<samp>Data/Movies</samp>]]. For example, <samp>[MovieTitle spring_movie_0]</samp> will output ''The Brave Little Sapling'' in English. | + | | The translated display name for a movie from [[Modding:Movie theater data|<samp>Data/Movies</samp>]]. For example, <samp>[MovieName spring_movie_0]</samp> will output ''The Brave Little Sapling'' in English. |
| |- | | |- |
− | | <samp>[NumberWithCommas {{t|number}}]</samp> | + | | <samp>[NumberWithSeparators {{t|number}}]</samp> |
− | | Format a number with thousands separators based on the current language. For example, <samp>[NumberWithCommas 5000000]</samp> will output ''5,000,000'' in English. | + | | Format a number with thousands separators based on the current language. For example, <samp>[NumberWithSeparators 5000000]</samp> will output ''5,000,000'' in English. |
| |- | | |- |
| | <samp>[PositiveAdjective]</samp> | | | <samp>[PositiveAdjective]</samp> |
Line 112: |
Line 110: |
| | | |
| ==Extensibility for C# mods== | | ==Extensibility for C# mods== |
− | C# mods can define custom tokens by calling <code>TokenParser.RegisterParser("tokenName", ...)</code>. To avoid conflicts, custom token names should apply the [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] conventions. | + | C# mods can define custom tokens by calling <code>TokenParser.RegisterParser("tokenName", ...)</code>. To avoid conflicts, custom token names should apply the [[Modding:Common data field types#Unique string ID|unique string ID]] conventions. |
| | | |
| [[Category:Modding]] | | [[Category:Modding]] |