Development FWLanguage

From Cloudrexx Development Wiki
Jump to: navigation, search


This article is a stub and needs further information.

See up to date API-documentation instead.


Language constants

BACKEND_LANG_ID

Is set to the visible backend language in the backend only (Interface language). In the frontend, it is NOT defined! It indicates a backend user and his currently selected language. Use this in methods that are intended for backend use only. It MUST NOT be used to determine the language for any kind of content!

FRONTEND_LANG_ID

Is set to the selected frontend or content language both in the back- and frontend. It always represents the language of content being viewed or edited. Use FRONTEND_LANG_ID for that purpose only!

LANG_ID

Is set to the same value as BACKEND_LANG_ID in the backend, and to the same value as FRONTEND_LANG_ID in the frontend. It always represents the current users' selected language. It *MUST NOT* be used to determine the language for any kind of content!

API

<highlightsyntax>FWLanguage::getNameArray($mode='frontend')</highlightsyntax> <highlightsyntax>FWLanguage::getDefaultLangId()</highlightsyntax> <highlightsyntax>FWLanguage::getLanguageArray()</highlightsyntax> <highlightsyntax>FWLanguage::getActiveFrontendLanguages()</highlightsyntax> <highlightsyntax>FWLanguage::getLanguageParameter($id, $index)</highlightsyntax> <highlightsyntax>FWLanguage::getMenu($selectedId=0, $menuName=, $onchange=)</highlightsyntax> <highlightsyntax>FWLanguage::getMenuActiveOnly($selectedId=0, $menuName=, $onchange=)</highlightsyntax> <highlightsyntax>FWLanguage::getMenuoptions($selectedId=0, $flagInactive=false)</highlightsyntax> <highlightsyntax>FWLanguage::getLangIdByIso639_1($langCode)</highlightsyntax> <highlightsyntax>FWLanguage::getLanguageCodeById($langId)</highlightsyntax> <highlightsyntax>FWLanguage::getLanguageIdByCode($code)</highlightsyntax>