updating oE translate
translate
include locale.e namespace locale public function translate(sequence word, object langmap = 0, object defval = "", integer mode = 0)
translates a word, using the current language file.
Parameters:
- word : a sequence, the word to translate.
- langmap : Either a value returned by lang_load or zero to use the default language map
- defval : a object. The value to return if the word cannot be translated. Default is "". If defval is PINF then the word is returned if it can not be translated.
- mode : an integer. If zero (the default) it uses word as the keyword and returns the translation text. If not zero it uses word as the translation and returns the keyword.
Returns:
A sequence, the value associated with word, or defval if there is no association.
Example 1:
sequence newword newword = translate(msgtext) if length(msgtext) = 0 then error_message(msgtext) else error_message(newword) end if
Example 2:
error_message(translate(msgtext, , PINF))
See Also:
Not Categorized, Please Help
|