Usage: static object: Class::method() - This class provides only STATIC methods
class Methods
public staticfunctiongetAvailableLanguages (
) {} :: ARRAY
@return: {ARRAY} The array with available language IDs ; sample: ['en', 'ro']
Regional Text :: Get Available Languages
public staticfunctiongetListOfLanguages (
) {} :: ARRAY
@return: {ARRAY} The array with available languages List ['en' => 'English', 'ro' => 'Romanian']
Regional Text :: Get (available) Languages List
public staticfunctionisDefaultLanguage (
string$y_language = ""
) {} :: BOOLEAN
@return: {BOOLEAN} Returns TRUE if the Current Language is the Default Language for the current session / or parameter otherwise returns FALSE
@param: {STRING} $y_language: Optional, the language ID to be checked ; otherwise will check the session language ; sample (for English) will be: 'en'
Regional Text :: Checks if the Current Language is the Default Language for the current session / or parameter
public staticfunctiongetDefaultLanguage (
) {} :: STRING
@return: {STRING} The language ID ; sample (for English) will return: 'en'
Regional Text :: Get the Default Language for the current session as Set by Init
public staticfunctiongetLanguage (
) {} :: STRING
@return: {STRING} The language ID ; sample (for English) will return: 'en'
Regional Text :: Get the Current Language for the current session as Set by Config / URL / Cookie / Method-Set
public staticfunctionsetLanguage (
string$y_language
) {} :: BOOLEAN
@return: {BOOLEAN} TRUE if successful, FALSE if not
@param: {STRING} $y_language: The language ID ; sample (for English) will be: 'en'
Regional Text :: Set the Language for current session
public staticfunctionvalidateLanguage (
string$y_language
) {} :: BOOLEAN
@return: {BOOLEAN} TRUE if language defined in configs, FALSE if not
@param: {STRING} $y_language: The language ID ; sample (for English) will be: 'en'
@return: {OBJECT} An Instance of SmartTextTranslator->
@param: {STRING} $y_area: The Translation Area
@param: {STRING} $y_subarea: The Translation Sub-Area
@param: {STRING} $y_custom_language: *OPTIONAL* a language code ; default empty ; if empty will use the current language
Regional Text :: Get the Translator object for: area, subarea and a custom language (if enforced and not using the current language)
It provides a Language Based Text Translations Layer for the Smart.Framework based Applications.