views:

1310

answers:

5

Hi all,

Happy New Year! :D

In Joomla:

$mainframe->getCfg('lang');

will return "english" (i think this is a default value), anyone can tell me where defined it? can i change it?

Thanks

A: 

It's what you configure in the Language Manager.

PEZ
A: 

Hi,PEZ

thanks for your answer. My Joomla site is based 1.5,not joomla1.0.* ; so there is no language code in configure file.

A: 

In Joomla! 1.5, go to Extensions > Language Manager. This will list all of the languages currently installed on your system, including the default (which you can set).

However, users can also select the language they want to use. The code $mainframe->getCfg('lang'); will return the language selected by the user instead of the default.

Also, you should avoid using the $mainframe object and instead retrieve the current language using JFactory:

$lang =& JFactory::getLanguage();
echo $lang->getName();
jlleblanc
A: 

jlleblanc,thanks for your help. i think i find the problem: its language files' problem,just change the backwardLang in metadata,Here are the codes:

<metadata>
<name>Simplified Chinese</name>
<tag>zh-CN</tag>
<rtl>0</rtl>
<locale>zh_CN.utf8, zh, zho, zhi, zh_CN, zho_CN, zhi_CN, simplified_chinese</locale>
<winCodePage>cp936</winCodePage>
<backwardLang>simplified_chinese</backwardLang>
</metadata>
A: 

bot_jcs.component.v.1.5.x.zip bot_jcs.content.v.1.5.x.zip bot_jcs.content.v.1.5.x.zip

dear sir,

I istall those three plugins in joomla 1.5.14.When i publish those plugin in plugin manager then error comes "Direct Access to this location is not allowed." and "Restricted access" my joomla administration page.How to solve it please give some help immediately.

biki