String API: Difference between revisions
From MoodleDocs
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
* get_string(), get_strings(), print_string() functions and roughly how they work (language packs, parent languages etc) | * get_string(), get_strings(), print_string() functions and roughly how they work (language packs, parent languages etc) | ||
* lang_string() class in 2.3 | * lang_string() class in 2.3 | ||
== See also == | |||
* [[Core APIs]] |
Revision as of 03:47, 16 January 2012
The String API is how you get language text strings to use in the user interface. It handles internationaliation issues, and will use a number of settings and environment variables to present the best text to every user.
This doc should talk about (at least):
- basic information on how to format the main language file in a plugin (eg mod/forum/lang/en/xxxx.php), copy info from Places_to_search_for_lang_strings to here. Include info on the REQUIRED strings such as "pluginname".
- Information on $a variables and how to use quotes correctly in the language strings
- get_string(), get_strings(), print_string() functions and roughly how they work (language packs, parent languages etc)
- lang_string() class in 2.3