[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Language/ -> Language.php (summary)

Joomla! Content Management System

Copyright: (C) 2005 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 1161 lines (31 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Language:: (44 methods):
  __construct()
  getInstance()
  _()
  transliterate()
  getTransliterator()
  setTransliterator()
  getPluralSuffixes()
  getPluralSuffixesCallback()
  setPluralSuffixesCallback()
  getIgnoredSearchWords()
  getIgnoredSearchWordsCallback()
  setIgnoredSearchWordsCallback()
  getLowerLimitSearchWord()
  getLowerLimitSearchWordCallback()
  setLowerLimitSearchWordCallback()
  getUpperLimitSearchWord()
  getUpperLimitSearchWordCallback()
  setUpperLimitSearchWordCallback()
  getSearchDisplayedCharactersNumber()
  getSearchDisplayedCharactersNumberCallback()
  setSearchDisplayedCharactersNumberCallback()
  load()
  loadLanguage()
  parse()
  debugFile()
  get()
  getTrace()
  getCallerInfo()
  getName()
  getPaths()
  getErrorFiles()
  getTag()
  getCalendar()
  isRtl()
  setDebug()
  getDebug()
  getDefault()
  setDefault()
  getOrphans()
  getUsed()
  hasKey()
  getLocale()
  getFirstDay()
  getWeekEnd()


Class: Language  - X-Ref

Languages/translation handler class

__construct($lang = null, $debug = false)   X-Ref
Constructor activating the default information of the language.

param: string   $lang   The language
param: boolean  $debug  Indicates if language debugging is enabled.

getInstance($lang, $debug = false)   X-Ref
Returns a language object.

param: string   $lang   The language to use.
param: boolean  $debug  The debug mode.
return: Language  The Language object.

_($string, $jsSafe = false, $interpretBackSlashes = true)   X-Ref
Translate function, mimics the php gettext (alias _) function.

The function checks if $jsSafe is true, then if $interpretBackslashes is true.

param: string   $string                The string to translate
param: boolean  $jsSafe                Make the result javascript safe
param: boolean  $interpretBackSlashes  Interpret \t and \n
return: string  The translation of the string

transliterate($string)   X-Ref
Transliterate function

This method processes a string and replaces all accented UTF-8 characters by unaccented
ASCII-7 "equivalents".

param: string  $string  The string to transliterate.
return: string  The transliteration of the string.

getTransliterator()   X-Ref
Getter for transliteration function

return: callable  The transliterator function

setTransliterator(callable $function)   X-Ref
Set the transliteration function.

param: callable  $function  Function name or the actual function.
return: callable  The previous function.

getPluralSuffixes($count)   X-Ref
Returns an array of suffixes for plural rules.

param: integer  $count  The count number the rule is for.
return: array    The array of suffixes.

getPluralSuffixesCallback()   X-Ref
Getter for pluralSuffixesCallback function.

return: callable  Function name or the actual function.

setPluralSuffixesCallback(callable $function)   X-Ref
Set the pluralSuffixes function.

param: callable  $function  Function name or actual function.
return: callable  The previous function.

getIgnoredSearchWords()   X-Ref
Returns an array of ignored search words

return: array  The array of ignored search words.

getIgnoredSearchWordsCallback()   X-Ref
Getter for ignoredSearchWordsCallback function.

return: callable  Function name or the actual function.

setIgnoredSearchWordsCallback(callable $function)   X-Ref
Setter for the ignoredSearchWordsCallback function

param: callable  $function  Function name or actual function.
return: callable  The previous function.

getLowerLimitSearchWord()   X-Ref
Returns a lower limit integer for length of search words

return: integer  The lower limit integer for length of search words (3 if no value was set for a specific language).

getLowerLimitSearchWordCallback()   X-Ref
Getter for lowerLimitSearchWordCallback function

return: callable  Function name or the actual function.

setLowerLimitSearchWordCallback(callable $function)   X-Ref
Setter for the lowerLimitSearchWordCallback function.

param: callable  $function  Function name or actual function.
return: callable  The previous function.

getUpperLimitSearchWord()   X-Ref
Returns an upper limit integer for length of search words

return: integer  The upper limit integer for length of search words (200 if no value was set or if default value is < 200).

getUpperLimitSearchWordCallback()   X-Ref
Getter for upperLimitSearchWordCallback function

return: callable  Function name or the actual function.

setUpperLimitSearchWordCallback(callable $function)   X-Ref
Setter for the upperLimitSearchWordCallback function

param: callable  $function  Function name or the actual function.
return: callable  The previous function.

getSearchDisplayedCharactersNumber()   X-Ref
Returns the number of characters displayed in search results.

return: integer  The number of characters displayed (200 if no value was set for a specific language).

getSearchDisplayedCharactersNumberCallback()   X-Ref
Getter for searchDisplayedCharactersNumberCallback function

return: callable  Function name or the actual function.

setSearchDisplayedCharactersNumberCallback(callable $function)   X-Ref
Setter for the searchDisplayedCharactersNumberCallback function.

param: callable  $function  Function name or the actual function.
return: callable  The previous function.

load($extension = 'joomla', $basePath = JPATH_BASE, $lang = null, $reload = false, $default = true)   X-Ref
Loads a single language file and appends the results to the existing strings

param: string   $extension  The extension for which a language file should be loaded.
param: string   $basePath   The basepath to use.
param: string   $lang       The language to load, default null for the current language.
param: boolean  $reload     Flag that will force a language to be reloaded if set to true.
param: boolean  $default    Flag that force the default language to be loaded if the current does not exist.
return: boolean  True if the file has successfully loaded.

loadLanguage($fileName, $extension = 'unknown')   X-Ref
Loads a language file.

This method will not note the successful loading of a file - use load() instead.

param: string  $fileName   The name of the file.
param: string  $extension  The name of the extension.
return: boolean  True if new strings have been added to the language

parse($fileName)   X-Ref
Parses a language file.

param: string  $fileName  The name of the file.
return: array  The array of parsed strings.

debugFile($filename)   X-Ref
Debugs a language file

param: string  $filename  Absolute path to the file to debug
return: integer  A count of the number of parsing errors

get($property, $default = null)   X-Ref
Get a metadata language property.

param: string  $property  The name of the property.
param: mixed   $default   The default value.
return: mixed  The value of the property.

getTrace()   X-Ref
Get a back trace.

return: array

getCallerInfo()   X-Ref
Determine who called Language or Text.

return: array  Caller information.

getName()   X-Ref
Getter for Name.

return: string  Official name element of the language.

getPaths($extension = null)   X-Ref
Get a list of language files that have been loaded.

param: string  $extension  An optional extension name.
return: array

getErrorFiles()   X-Ref
Get a list of language files that are in error state.

return: array

getTag()   X-Ref
Getter for the language tag (as defined in RFC 3066)

return: string  The language tag.

getCalendar()   X-Ref
Getter for the calendar type

return: string  The calendar type.

isRtl()   X-Ref
Get the RTL property.

return: boolean  True is it an RTL language.

setDebug($debug)   X-Ref
Set the Debug property.

param: boolean  $debug  The debug setting.
return: boolean  Previous value.

getDebug()   X-Ref
Get the Debug property.

return: boolean  True is in debug mode.

getDefault()   X-Ref
Get the default language code.

return: string  Language code.

setDefault($lang)   X-Ref
Set the default language code.

param: string  $lang  The language code.
return: string  Previous value.

getOrphans()   X-Ref
Get the list of orphaned strings if being tracked.

return: array  Orphaned text.

getUsed()   X-Ref
Get the list of used strings.

Used strings are those strings requested and found either as a string or a constant.

return: array  Used strings.

hasKey($string)   X-Ref
Determines is a key exists.

param: string  $string  The key to check.
return: boolean  True, if the key exists.

getLocale()   X-Ref
Get the language locale based on current language.

return: array  The locale according to the language.

getFirstDay()   X-Ref
Get the first day of the week for this language.

return: integer  The first day of the week according to the language

getWeekEnd()   X-Ref
Get the weekends days for this language.

return: string  The weekend days of the week separated by a comma according to the language



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer