Note:

This site is no longer used and is in read-only mode. Instead please go to our new Moodle Developer Resource site.

String API

From MoodleDocs
Revision as of 03:14, 16 January 2012 by Martin Dougiamas (talk | contribs)

The String API is how you get language text strings to use in the user interface. It handles any language translations that might be available.

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
  • get_string(), get_strings(), print_string() functions and roughly how they work (language packs, parent languages etc)
  • lang_string() class in 2.3