[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/libraries/joomla/language/ -> language.php (summary)

(no description)

Copyright: Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
License: GNU/GPL, see LICENSE.php
Version: $Id: language.php 14401 2010-01-26 14:10:00Z louis $
File Size: 782 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

JLanguage:: (30 methods):
  __construct()
  _()
  transliterate()
  exists()
  load()
  _load()
  get()
  _getCallerInfo()
  getName()
  getPaths()
  getPdfFontName()
  getWinCP()
  getBackwardLang()
  getTag()
  getLocale()
  isRTL()
  setDebug()
  getDebug()
  getDefault()
  setDefault()
  getOrphans()
  getUsed()
  hasKey()
  getMetadata()
  getKnownLanguages()
  getLanguagePath()
  setLanguage()
  _parseLanguageFiles()
  _parseXMLLanguageFiles()
  _parseXMLLanguageFile()


Class: JLanguage  - X-Ref

Languages/translation handler class

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


_($string, $jsSafe = false)   X-Ref
No description

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

exists($lang, $basePath = JPATH_BASE)   X-Ref
Check if a language exists

This is a simple, quick check for the directory that should contain language files for the given user.

param: string $lang Language to check
param: string $basePath Optional path to check
return: boolean True if the language exists

load( $extension = 'joomla', $basePath = JPATH_BASE, $lang = null, $reload = false )   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
return: boolean    True, if the file has successfully loaded.

_load( $filename, $extension = 'unknown', $overwrite = true )   X-Ref
Loads a language file

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

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

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

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

_getCallerInfo()   X-Ref
Determine who called JLanguage or JText

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 option extension name
return: array

getPdfFontName()   X-Ref
Getter for PDF Font Name

return: string name of pdf font to be used

getWinCP()   X-Ref
Getter for Windows locale code page

return: string windows locale encoding

getBackwardLang()   X-Ref
Getter for backward compatible language name

return: string backward compatible name

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

return: string The language tag

getLocale()   X-Ref
Get locale property

return: string The locale property

isRTL()   X-Ref
Get the RTL property

return: boolean True is it an RTL language

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

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

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($key)   X-Ref
Determines is a key exists

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

getMetadata($lang)   X-Ref
Returns a associative array holding the metadata

param: string    The name of the language
return: mixed    If $lang exists return key/value pair with the language metadata,

getKnownLanguages($basePath = JPATH_BASE)   X-Ref
Returns a list of known languages for an area

param: string    $basePath     The basepath to use
return: array    key/value pair with the language file and real name

getLanguagePath($basePath = JPATH_BASE, $language = null )   X-Ref
Get the path to a language

param: string $basePath  The basepath to use
param: string $language    The language tag
return: string    language related path or null

setLanguage($lang)   X-Ref
Set the language attributes to the given language

Once called, the language still needs to be loaded using JLanguage::load()

param: string    $lang    Language code
return: string    Previous value

_parseLanguageFiles($dir = null)   X-Ref
Searches for language directories within a certain base dir

param: string     $dir     directory of files
return: array    Array holding the found languages as filename => real name pairs

_parseXMLLanguageFiles($dir = null)   X-Ref
Parses XML files for language information

param: string    $dir     Directory of files
return: array    Array holding the found languages as filename => metadata array

_parseXMLLanguageFile($path)   X-Ref
Parse XML file for language information

param: string    $path     Path to the xml files
return: array    Array holding the found metadata as a key => value pair



Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1