Jala 1.3

Class jala.I18n

Object
   |
   +--jala.I18n

class jala.I18n


This class provides various functions and macros for internationalization of Helma applications.
Defined in I18n.js


Constructor Summary
jala.I18n ()
            Constructs a new instance of jala.I18n
 
Method Summary
 String formatMessage(<String> message, <Array> values)
           Converts the message passed as argument into an instance of java.text.MessageFormat, and formats it using the replacement values passed.
 Object getCatalog(locale)
           Helper method to get the message catalog corresponding to the actual locale.
 java.util.Locale getLocale(localeId)
           Returns the locale for the given id, which is expected to follow the form language[_COUNTRY][_variant], where language is a valid ISO Language Code (eg.
 Function getLocaleGetter()
           Get the method for retrieving the locale.
 Object getMessages()
           Get the message object.
 String gettext(<String> key )
           Returns a localized message for the message key passed as argument.
 String markgettext(<String> key)
           A simple proxy method which is used to mark a message string for the i18n parser as to be translated.
 String message_macro(param)
           Returns a translated message.
 String ngettext(<String> singularKey, <String> pluralKey, <Number> amount )
           Returns a localized message for the message key passed as argument.
 void setHandler(<Object> handler)
           Set (overwrite) the default handler containing the messages (ie.
 void setLocaleGetter(<Function> func)
           Set the method for retrieving the locale.
 void setMessages(<Object> msgObject)
           Overwrite the default object containing the messages (ie.
 String translate(singularKey, pluralKey, <Number> amount)
           Tries to "translate" the given message key into a localized message.

Constructor Detail

jala.I18n

jala.I18n()

Method Detail

formatMessage

String formatMessage(<String> message, <Array> values)

getCatalog

Object getCatalog(locale)

getLocale

java.util.Locale getLocale(localeId)

getLocaleGetter

Function getLocaleGetter()

getMessages

Object getMessages()

gettext

String gettext(<String> key )

markgettext

String markgettext(<String> key)

message_macro

String message_macro(param)

ngettext

String ngettext(<String> singularKey, <String> pluralKey, <Number> amount )

setHandler

void setHandler(<Object> handler)

setLocaleGetter

void setLocaleGetter(<Function> func)

setMessages

void setMessages(<Object> msgObject)

translate

String translate(singularKey, pluralKey, <Number> amount)

Jala 1.3

Documentation generated by JSDoc on Tue Jan 8 15:45:31 2008