Object ng.Language vs. 1.1.0 Full+Lite

The Language object is a collection of functions that help translating and localization for different components.

Properties

Adding a Language vs. 1.1.0 Full+Lite
Language files are an easy way to allow translation of components or JavaScript output without having to re-write the same code for each language.
Function ng.Language.load (file, lang) vs. 1.1.0 Full+Lite
This function loads a specific language file. It should be used before using the language variables.
Function ng.Language.set_language (lang, obj) vs. 1.1.0 Full+Lite
Adds variables to the language object to be used in translation.
Function ng.Language.get_language (lang) vs. 1.1.0 Full+Lite
Gets the language object.
Function ng.Language.translate_numbers (str, lang) vs. 1.1.0 Full+Lite
This function help in translating numbers from English to a given language in a string.
Function ng.Language.numbers_to_english (str, lang) vs. 1.1.0 Full+Lite
This function reverse the ng.Language.translate_numbers function and change digits from the givin language (lang) into English digits.
Function ng.Language.date_to_english (dt_str, lang) vs. 1.1.0 Full+Lite
This function translates a date string from a given language (lang) into English.
Function ng.Language.t (str, lang) vs. 1.1.0 Full+Lite
Gets the translation variable from the language object.
Function ng.Language.get_dir (lang) vs. 1.1.0 Full+Lite
Gets the language direction. Either ltr or rtl (from the language object).