Actions

Category talk

Difference between revisions of "Tips and tricks 1.5"

From Joomla! Documentation

(get language properties)
 
m (Removed non-English wording.)
 
Line 1: Line 1:
 
for get language property
 
for get language property
 
بدست آوردن زبان و راست به چپ بودن و زبان سایت
 
 
  
 
===== get main name language =====
 
===== get main name language =====
Line 32: Line 29:
 
$language = $lg->get('backwardLang');
 
$language = $lg->get('backwardLang');
 
echo $language;
 
echo $language;
 +
 +
----
 +
Thanks, but this should be moved elsewhere. [[User:Chris Davenport|Chris Davenport]] 02:44, 28 August 2008 (EDT)

Latest revision as of 01:44, 28 August 2008

for get language property

Contents

get main name language

$lg = &JFactory::getLanguage(); $language = $lg->get('name'); echo $language;


get direction language (sample : check farsi and arabic)

$lg = &JFactory::getLanguage(); $language = $lg->get('rtl'); if ($language) echo $language;


get name language

$lg = &JFactory::getLanguage(); $language = $lg->get('name'); echo $language;

get code page language

$lg = &JFactory::getLanguage(); $language = $lg->get('winCodePage'); echo $language;

get name language

$lg = &JFactory::getLanguage(); $language = $lg->get('backwardLang'); echo $language;


Thanks, but this should be moved elsewhere. Chris Davenport 02:44, 28 August 2008 (EDT)