This is the code documentation for the Pelzini project
Search documentation |
file /viewer/i18n.phpNamespace: viewer This is a set of functions for internationalisation. The main functions are: loadLanguage for loading a language file str for returning a language string setParam for manually setting a replacement parameter clearParams for clearing all replacement parameters Authors
FunctionsClears all named parameters that are used by the str function Returns the original string from the string table, without any parameter replacement Loads a language file If you are using a language which may not be complete, it is advisable to load another language which you know is complete first (e.g. English) This will prevent empty strings being returned. Replaces params in strings Replacements can be in the following forms: {PARAM} Does a replacement with a named parameter, PARAM, specified in any case {#PLURAL|PARAM|SINGLE|MULTIPLE} Does a replacement with SINGLE if PARAM (any case) is 1, and with MULTIPLE if PARAM is anything else {#NL} Adds a new line to the output {#URLENC|PARAM} Returns the specified parameter, urlencode()ed. {#HTMLENC|PARAM} Returns the specified parameter, htmlspecialchars()ed. Does the actual legwork for param_replace Outputs a string, and sets arguments This function also allows additional functions after the string constant, printf style. Because the language system uses named arguments, arguments should be specified in pairs The first argument should be the param name, the second argument should be the param |
Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Thursday, 15th March, 2018 at 02:05 pm |