detect current language of joomla using gtranslate

General questions regarding the use of languages in Joomla! 1.5.

Moderator: General Support Moderators

karwal1
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Feb 02, 2010 3:28 pm

detect current language of joomla using gtranslate

Postby karwal1 » Mon May 17, 2010 4:52 am

Hello

I am using gtranslate for joomla site and i have to convert site in arabic .So for this m using gtranslate and when arabic is selected i want to use RTL css file.I tried $lang = &JFactory::getLanguage(); to detect current language but this is showing default language of joomla.If anybody can tell me solution to detect arabic language so that i can use rtl style sheet on that language that will be very helpfull,I m trying from 3 days but no solution found.Please please help me.

Thanks

neryba
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Nov 11, 2010 9:54 pm

Re: detect current language of joomla using gtranslate

Postby neryba » Thu Nov 11, 2010 10:01 pm

Try this!

$language = JRequest::getVar( 'lang', '', 'request', 'string');
if($language == '')
$language = ($_REQUEST[jfcookie][lang] == '')? 'pt':$_COOKIE[jfcookie][lang];

karwal1
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Feb 02, 2010 3:28 pm

Re: detect current language of joomla using gtranslate

Postby karwal1 » Fri Nov 12, 2010 4:16 am

Thanks for reply...but its too late..i got this solution before and completed two of templates...anyways thanks...

peaceandlove
Joomla! Guru
Joomla! Guru
Posts: 942
Joined: Wed Jul 08, 2009 12:40 pm

Re: detect current language of joomla using gtranslate

Postby peaceandlove » Thu Aug 11, 2016 6:17 am

Can any body help me where to put that code?

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 23561
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: detect current language of joomla using gtranslate

Postby Per Yngve Berg » Thu Aug 11, 2016 6:27 am

This is the Joomla 1.5 Forum. The code does not apply to newer versions.

Please post in the proper forum.


Return to “Language - Joomla! 1.5”

Who is online

Users browsing this forum: No registered users and 4 guests