User Tools

Site Tools


set_language

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
set_language [2017/05/14 16:36] justinset_language [2021/04/21 18:52] (current) justin
Line 2: Line 2:
 ---- ----
  
-Switches the active language used for message translation. The two-letter ISO 639-1 code should be used (e.g. "en" for English, "fr" for French, etc.). See https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes for a list of codes. This function was primarily implemented for localization debugging. The language setting can be adjusted at any time from the [[Options]] menu.+Switches the active language used for message translation. This function was primarily implemented for localization debugging. The language setting can be adjusted at any time from the [[Options Menu]]. Refer to the [[Localization]] page for more information.
  
 +====Signature:====
 <code python> <code python>
 set_language(locale_code) set_language(locale_code)
Line 9: Line 10:
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
-|locale_code|Two-letter code representing the desired language.|[[String]]|Yes|+|locale_code|Code representing the desired language.|[[String]]|Yes|
  
 ====Example:==== ====Example:====
-<code python+<code bauxite
-set_language("en")+set_language("en");
 </code> </code>
-//Results://+//Results:// The language used for translation is switched to English.
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-Use the **Set Language** function in your startup script to force a specific translation for testing purposes.+Use the **Set Language** function in your game's [[startup script]] to force a specific translation for testing purposes.
 </WRAP> </WRAP>
  
Line 30: Line 31:
  
 <WRAP half column> <WRAP half column>
-====Visual Demo:==== 
-{{:wiki:set_language_demo.gif?nolink|}} 
 </WRAP> </WRAP>
 </WRAP> </WRAP>
set_language.1494805005.txt.gz · Last modified: 2017/05/14 16:36 by justin