\JLanguage
Languages/translation handler class
Synopsis
class JLanguage
{
- // members
- protected $languages;
- protected $debug;
- protected $default;
- protected $orphans;
- protected $metadata;
- protected array|boolean $locale;
- protected $lang;
- protected $paths;
- protected $errorfiles;
- protected $strings;
- protected $used;
- protected $counter;
- protected $override;
- protected $transliterator;
- protected callable $pluralSuffixesCallback;
- protected callable $ignoredSearchWordsCallback;
- protected callable $lowerLimitSearchWordCallback;
- protected callable $upperLimitSearchWordCallback;
- protected callable $searchDisplayedCharactersNumberCallback;
- // methods
- public void __construct()
- public static JLanguage getInstance()
- public string _()
- public string transliterate()
- public callable getTransliterator()
- public callable setTransliterator()
- public array getPluralSuffixes()
- public callable getPluralSuffixesCallback()
- public callable setPluralSuffixesCallback()
- public array getIgnoredSearchWords()
- public callable getIgnoredSearchWordsCallback()
- public callable setIgnoredSearchWordsCallback()
- public integer getLowerLimitSearchWord()
- public callable getLowerLimitSearchWordCallback()
- public callable setLowerLimitSearchWordCallback()
- public integer getUpperLimitSearchWord()
- public callable getUpperLimitSearchWordCallback()
- public callable setUpperLimitSearchWordCallback()
- public integer getSearchDisplayedCharactersNumber()
- public callable getSearchDisplayedCharactersNumberCallback()
- public callable setSearchDisplayedCharactersNumberCallback()
- public static boolean exists()
- public boolean load()
- protected boolean loadLanguage()
- protected array parse()
- public mixed get()
- protected array getCallerInfo()
- public string getName()
- public array getPaths()
- public array getErrorFiles()
- public string getTag()
- public boolean isRTL()
- public boolean setDebug()
- public boolean getDebug()
- public string getDefault()
- public string setDefault()
- public array getOrphans()
- public array getUsed()
- public boolean hasKey()
- public static mixed getMetadata()
- public static array getKnownLanguages()
- public static string getLanguagePath()
- public string setLanguage()
- public array getLocale()
- public integer getFirstDay()
- public string getWeekEnd()
- public static array parseLanguageFiles()
- public static array parseXMLLanguageFile()
Hierarchy
Extended by
Members
protected
- $counter
—
integer
Counter for number of loads. - $debug
—
boolean
Debug language, If true, highlights if string isn't found. - $default
—
string
The default language, used when a language file in the requested language does not exist. - $errorfiles
—
array
List of language files that are in error state - $ignoredSearchWordsCallback
—
callable
Name of the ignoredSearchWordsCallback function for this language. - $lang
—
string
The language to load. - $languages
—
array
Array of JLanguage objects - $locale
—
array|boolean
Array holding the language locale or boolean null if none. - $lowerLimitSearchWordCallback
—
callable
Name of the lowerLimitSearchWordCallback function for this language. - $metadata
—
array
Array holding the language metadata. - $orphans
—
array
An array of orphaned text. - $override
—
array
An array used to store overrides. - $paths
—
array
A nested array of language files that have been loaded - $pluralSuffixesCallback
—
callable
Name of the pluralSuffixesCallback function for this language. - $searchDisplayedCharactersNumberCallback
—
callable
Name of the searchDisplayedCharactersNumberCallback function for this language. - $strings
—
array
Translations - $transliterator
—
string
Name of the transliterator function for this language. - $upperLimitSearchWordCallback
—
callable
Name of the uppperLimitSearchWordCallback function for this language. - $used
—
array
An array of used text, used during debugging.
Methods
protected
- getCallerInfo() — Determine who called JLanguage or JText.
- loadLanguage() — Loads a language file.
- parse() — Parses a language file.
public
- __construct() — Constructor activating the default information of the language.
- _() — Translate function, mimics the php gettext (alias _) function.
- exists() — Checks if a language exists.
- get() — Get a metadata language property.
- getDebug() — Get the Debug property.
- getDefault() — Get the default language code.
- getErrorFiles() — Get a list of language files that are in error state.
- getFirstDay() — Get the first day of the week for this language.
- getIgnoredSearchWords() — Returns an array of ignored search words
- getIgnoredSearchWordsCallback() — Getter for ignoredSearchWordsCallback function.
- getInstance() — Returns a language object.
- getKnownLanguages() — Returns a list of known languages for an area
- getLanguagePath() — Get the path to a language
- getLocale() — Get the language locale based on current language.
- getLowerLimitSearchWord() — Returns a lower limit integer for length of search words
- getLowerLimitSearchWordCallback() — Getter for lowerLimitSearchWordCallback function
- getMetadata() — Returns a associative array holding the metadata.
- getName() — Getter for Name.
- getOrphans() — Get the list of orphaned strings if being tracked.
- getPaths() — Get a list of language files that have been loaded.
- getPluralSuffixes() — Returns an array of suffixes for plural rules.
- getPluralSuffixesCallback() — Getter for pluralSuffixesCallback function.
- getSearchDisplayedCharactersNumber() — Returns the number of characters displayed in search results.
- getSearchDisplayedCharactersNumberCallback() — Getter for searchDisplayedCharactersNumberCallback function
- getTag() — Getter for the language tag (as defined in RFC 3066)
- getTransliterator() — Getter for transliteration function
- getUpperLimitSearchWord() — Returns an upper limit integer for length of search words
- getUpperLimitSearchWordCallback() — Getter for upperLimitSearchWordCallback function
- getUsed() — Get the list of used strings.
- getWeekEnd() — Get the weekends days for this language.
- hasKey() — Determines is a key exists.
- isRTL() — Get the RTL property.
- load() — Loads a single language file and appends the results to the existing strings
- parseLanguageFiles() — Searches for language directories within a certain base dir.
- parseXMLLanguageFile() — Parse XML file for language information.
- setDebug() — Set the Debug property.
- setDefault() — Set the default language code.
- setIgnoredSearchWordsCallback() — Setter for the ignoredSearchWordsCallback function
- setLanguage() — Set the language attributes to the given language.
- setLowerLimitSearchWordCallback() — Setter for the lowerLimitSearchWordCallback function.
- setPluralSuffixesCallback() — Set the pluralSuffixes function.
- setSearchDisplayedCharactersNumberCallback() — Setter for the searchDisplayedCharactersNumberCallback function.
- setTransliterator() — Set the transliteration function.
- setUpperLimitSearchWordCallback() — Setter for the upperLimitSearchWordCallback function
- transliterate() — Transliterate function