

Public Member Functions | |
| resetBaseLanguage () | |
| getBaseLanguage () | |
| getObjectTplLanguage () | |
| getTplLanguage () | |
| getEditLanguage () | |
| getLanguageArray ($iLanguage=null, $blOnlyActive=false, $blSort=false) | |
| getAdminTplLanguageArray () | |
| getLanguageAbbr ($iLanguage=null) | |
| getLanguageNames () | |
| getLanguageIds () | |
| translateString ($sStringToTranslate, $iLang=null, $blAdminMode=null) | |
| formatCurrency ($dValue, $oActCur=null) | |
| formatVat ($dValue, $oActCur=null) | |
| getLanguageTag ($iLanguage=null) | |
| validateLanguage ($iLang=null) | |
| setBaseLanguage ($iLang=null) | |
| setTplLanguage ($iLang=null) | |
| getName () | |
| getFormLang () | |
| getUrlLang ($iLang=null) | |
| processUrl ($sUrl, $iLang=null) | |
| detectLanguageByBrowser () | |
Static Public Member Functions | |
| static | getInstance () | 
Protected Member Functions | |
| _recodeLangArray ($aLangArray, $sCharset) | |
| _getLangFilesPathArray ($blAdmin, $iLang) | |
| _getLangFileCacheName ($blAdmin, $iLang) | |
| _getLanguageFileData ($blAdmin=false, $iLang=0) | |
| _getCacheLanguageId ($blAdmin, $iLang=null) | |
| _getLangTranslationArray ($iLang=null, $blAdmin=null) | |
| _readTranslateStrFromTextFile ($sStringToTranslate, $iLang=null, $blIsAdmin=null) | |
| _sortLanguagesCallback ($a1, $a2) | |
Protected Attributes | |
| $_sName = 'lang' | |
| $_iBaseLanguageId = null | |
| $_iTplLanguageId = null | |
| $_iEditLanguageId = null | |
| $_aLangCache = array() | |
| $_aAdminLangCache = array() | |
| $_aAdminTplLanguageArray = null | |
| $_aLangAbbr = null | |
Static Private Attributes | |
| static | $_instance = null | 
Language related utility class
Definition at line 6 of file oxlang.php.
| oxLang._getCacheLanguageId | ( | $ | blAdmin, | |
| $ |  iLang = null | |||
| ) |  [protected] | 
        
Returns current language cache language id
| bool | $blAdmin admin mode | |
| int | $iLang language id [optional] | 
Definition at line 697 of file oxlang.php.
| oxLang._getLangFileCacheName | ( | $ | blAdmin, | |
| $ | iLang | |||
| ) |  [protected] | 
        
Returns language cache file name
| bool | $blAdmin admin or not | |
| int | $iLang current language id | 
Definition at line 628 of file oxlang.php.
| oxLang._getLangFilesPathArray | ( | $ | blAdmin, | |
| $ | iLang | |||
| ) |  [protected] | 
        
Returns array with pathes where language files are stored
| bool | $blAdmin admin mode | |
| int | $iLang active language | 
Definition at line 597 of file oxlang.php.
| oxLang._getLangTranslationArray | ( | $ |  iLang = null,  | 
        |
| $ |  blAdmin = null | |||
| ) |  [protected] | 
        
get language array from lang translation file
| int | $iLang optional language | |
| bool | $blAdmin admin mode switch | 
Definition at line 718 of file oxlang.php.
| oxLang._getLanguageFileData | ( | $ |  blAdmin = false,  | 
        |
| $ |  iLang = 0 | |||
| ) |  [protected] | 
        
Returns language cache array
| bool | $blAdmin admin or not [optional] | |
| int | $iLang current language id [optional] | 
Definition at line 642 of file oxlang.php.
| oxLang._readTranslateStrFromTextFile | ( | $ | sStringToTranslate, | |
| $ |  iLang = null,  | 
        |||
| $ |  blIsAdmin = null | |||
| ) |  [protected] | 
        
translates a given string
| string | $sStringToTranslate string that should be translated | |
| int | $iLang language id (optional) | |
| bool | $blIsAdmin admin mode switch (default null) | 
Definition at line 750 of file oxlang.php.
| oxLang._recodeLangArray | ( | $ | aLangArray, | |
| $ | sCharset | |||
| ) |  [protected] | 
        
Goes through language array and recodes its values. Returns recoded data
| array | $aLangArray language data | |
| string | $sCharset charset which was used while making file | 
Definition at line 580 of file oxlang.php.
| oxLang._sortLanguagesCallback | ( | $ | a1, | |
| $ | a2 | |||
| ) |  [protected] | 
        
Language sorting callback function
| object | $a1 first value to check | |
| object | $a2 second value to check | 
Definition at line 806 of file oxlang.php.
| oxLang.detectLanguageByBrowser | ( | ) | 
Detect language by user browser settings. Returns language ID if detected, otherwise returns null.
Definition at line 894 of file oxlang.php.
| oxLang.formatCurrency | ( | $ | dValue, | |
| $ |  oActCur = null | |||
| ) | 
Returns formatted number, according to active currency formatting standards.
| double | $dValue Plain price | |
| object | $oActCur Object of active currency | 
Definition at line 455 of file oxlang.php.
| oxLang.formatVat | ( | $ | dValue, | |
| $ |  oActCur = null | |||
| ) | 
Returns formatted vat value, according to formatting standards.
| double | $dValue Plain price | |
| object | $oActCur Object of active currency | 
Definition at line 471 of file oxlang.php.
| oxLang.getAdminTplLanguageArray | ( | ) | 
Returns languages array containing possible admin template translations
Definition at line 308 of file oxlang.php.
| oxLang.getBaseLanguage | ( | ) | 
| oxLang.getEditLanguage | ( | ) | 
Returns editing object working language id
Definition at line 209 of file oxlang.php.
| oxLang.getFormLang | ( | ) | 
| static oxLang.getInstance | ( | ) |  [static] | 
        
| oxLang.getLanguageAbbr | ( | $ |  iLanguage = null | 
          ) | 
Returns selected language abbervation
| int | $iLanguage language id [optional] | 
Definition at line 360 of file oxlang.php.
| oxLang.getLanguageArray | ( | $ |  iLanguage = null,  | 
        |
| $ |  blOnlyActive = false,  | 
        |||
| $ |  blSort = false | |||
| ) | 
Returns array of available languages.
| integer | $iLanguage Number if current language (default null) | |
| bool | $blOnlyActive load only current language or all | |
| bool | $blSort enable sorting or not | 
Definition at line 252 of file oxlang.php.
| oxLang.getLanguageIds | ( | ) | 
Returns available language IDs (abbervations)
Definition at line 403 of file oxlang.php.
| oxLang.getLanguageNames | ( | ) | 
getLanguageNames returns array of language names e.g. array('Deutch', 'English')
public
Definition at line 387 of file oxlang.php.
| oxLang.getLanguageTag | ( | $ |  iLanguage = null | 
          ) | 
According to user configuration forms and return language prefix.
| integer | $iLanguage User selected language (default null) | 
Definition at line 492 of file oxlang.php.
| oxLang.getName | ( | ) | 
| oxLang.getObjectTplLanguage | ( | ) | 
Returns language id used to load objects according to current template language
Definition at line 175 of file oxlang.php.
| oxLang.getTplLanguage | ( | ) | 
Returns active shop templates language id If it is not an admin area, template language id is same as base shop language id
Definition at line 195 of file oxlang.php.
| oxLang.getUrlLang | ( | $ |  iLang = null | 
          ) | 
Returns url language parameter
| int | $iLang lanugage id [optional] | 
Definition at line 842 of file oxlang.php.
| oxLang.processUrl | ( | $ | sUrl, | |
| $ |  iLang = null | |||
| ) | 
Is needed appends url with language parameter Direct usage of this method to retrieve end url result is discouraged - instead see oxUtilsUrl.processUrl
| string | $sUrl url to process | |
| int | $iLang language id [optional] | 
Definition at line 864 of file oxlang.php.
| oxLang.resetBaseLanguage | ( | ) | 
resetBaseLanguage resets base language id cache
public
Definition at line 101 of file oxlang.php.
| oxLang.setBaseLanguage | ( | $ |  iLang = null | 
          ) | 
Set base shop language
| int | $iLang Language id | 
Definition at line 532 of file oxlang.php.
| oxLang.setTplLanguage | ( | $ |  iLang = null | 
          ) | 
Validates and sets templates language id
| int | $iLang Language id | 
Definition at line 554 of file oxlang.php.
| oxLang.translateString | ( | $ | sStringToTranslate, | |
| $ |  iLang = null,  | 
        |||
| $ |  blAdminMode = null | |||
| ) | 
Searches for translation string in file and on success returns translation, otherwise returns initial string.
| string | $sStringToTranslate Initial string | |
| int | $iLang optional language number | |
| bool | $blAdminMode on special case you can force mode, to load language constant from admin/shops language file | 
| oxLanguageException | in debug mode | 
Definition at line 434 of file oxlang.php.
| oxLang.validateLanguage | ( | $ |  iLang = null | 
          ) | 
Validate language id. If not valid id, returns default value
| int | $iLang Language id | 
Definition at line 510 of file oxlang.php.
oxLang.$_aAdminLangCache = array() [protected] | 
        
Definition at line 55 of file oxlang.php.
oxLang.$_aAdminTplLanguageArray = null [protected] | 
        
Definition at line 62 of file oxlang.php.
oxLang.$_aLangAbbr = null [protected] | 
        
Definition at line 69 of file oxlang.php.
oxLang.$_aLangCache = array() [protected] | 
        
Definition at line 48 of file oxlang.php.
oxLang.$_iBaseLanguageId = null [protected] | 
        
Definition at line 27 of file oxlang.php.
oxLang.$_iEditLanguageId = null [protected] | 
        
Definition at line 41 of file oxlang.php.
oxLang.$_instance = null [static, private] | 
        
Definition at line 13 of file oxlang.php.
oxLang.$_iTplLanguageId = null [protected] | 
        
Definition at line 34 of file oxlang.php.
oxLang.$_sName = 'lang' [protected] | 
        
Definition at line 20 of file oxlang.php.
 1.6.2