FfLanguageHelper
|
+--FfLH
public class FfLH
extends FfLanguageHelper
Fields inherited from FORMfields.FfLanguageHelper | |
---|---|
language, translationFilename, translations, translationsLoaded |
Method Summary | |
---|---|
FfLanguageHelper | s() Returns a singleton instance of this class. |
FfLanguageHelper | 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 |
public FfLanguageHelper s()
Returns a singleton instance of this class. A convenience method so that you don't have to always type singelton().
public FfLanguageHelper singleton()
Returns a singleton instance of this class.
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.
A convenience class for accessing the FfLanguageHelper without typing FfLanguageHelper.