FORMfields


FORMfields.FfLH

Class FfLH

FfLanguageHelper
|
+--FfLH

public class FfLH
extends FfLanguageHelper

A convenience class for accessing the FfLanguageHelper without typing FfLanguageHelper.

Since:
FORMfields v3.0

Fields inherited from FORMfields.FfLanguageHelper
language, translationFilename, translations, translationsLoaded
Method Summary
FfLanguageHelper

s()

Returns a singleton instance of this class.

FfLanguageHelper

singleton()

Returns a singleton instance of this class.

mixed

t(mixed label)

Returns the translation(s) for the given label(s).

Methods inherited from FORMfields.FfLanguageHelper
getLanguage, loadTranslationsIfNeeded, setLanguage, setTranslationFilename, translate, translateLabel

Method Detail

s

public FfLanguageHelper s()

Returns a singleton instance of this class. A convenience method so that you don't have to always type singelton().

Returns:
a singleton instance of this class
Since:
FORMfields v3.0

singleton

public FfLanguageHelper singleton()

Returns a singleton instance of this class.

Returns:
a singleton instance of this class
Since:
FORMfields v3.0

t

public mixed t(mixed label)

Returns the translation(s) for the given label(s). If the $GLOBALS["FF_LANGUAGE_NATIVE_SHORTCUT"] is set to true then if the current language is the same as the native language then the label(s) are immediately returned. If not, the translation file is loaded, if not already loaded, and the appropriate translation(s) are returned according to the current language. Provided a convenience method so that "translate" doesn't have to be typed out each time.

Parameters:
label - the label(s) to translate
Returns:
the translated label(s) according to the current language
Since:
FORMfields v3.0

FORMfields