how to get current language in use ?

Please use this forum for all development issues related to 3rd Party extensions or own development
Forum rules
Before posting, see the developer documentation and don't forget to search the forums.

Then check if you are running the latest available versions of Joomla! (1.5.18), Joom!Fish (2.0.4) and the extensions you're having problems with.

We need the following at least (you can find this in your Joomla! backend under help > system info):

* Joomla! version
* Joom!Fish version
* Extension version
* PHP version (e.g. 5.2.5). Note: The support for PHP4 is discontinued.
* Web Server software (Apache or IIS with version number if possible)
* Server Operating system (e.g. Linux, Windows, Solaris, Darwin ...)
* Webserver to PHP Interface
* Database version
* memory_limit from your phpinfo

Please enable error reporting and include any error messages in your posting.

Finally, please describe the steps required to recreate the problem and also please enable error reporting and give us any error messages generated.

how to get current language in use ?

Postby gandahar on Wed Apr 22, 2009 3:35 pm

Hi !

im using joomla with joomfish, i have a a link to wrapper
i need the page displayed in the wrapper get the current language in use in joomla to autochange in the wrapped page

anyone can help please ?

thank you
gandahar
Newbee
 
Posts: 2
Joined: Wed Apr 22, 2009 3:31 pm

Re: how to get current language in use ?

Postby gandahar on Thu Apr 23, 2009 11:05 am

heeeeeelp please
gandahar
Newbee
 
Posts: 2
Joined: Wed Apr 22, 2009 3:31 pm

Re: how to get current language in use ?

Postby six gun on Tue Apr 28, 2009 2:29 am

I have read what you have written several times but I cannot work out what it is you are trying to do.

Give a link to the page you have the problem with then people can see exactly what the problem is.

Are you saying you have a wrapper page on your site.
When you switch between languages on your site you want the web page displayed inside the wrapper to change as well.

You can change the url of the page opening inside a wrapper.

Let's say you have a menu item which when clicked on opened a wrapper page and the webpage opening inside the wrapper is msn.com
Let's say you call this menu item "msn USA"
If you then go into the translation section of Joomfish - open the menu section - you'll see msn USA.
Say you want to translated things into German. You can translated the menu tab to "msn DE" - but you can also "translate" the url of the webpage opening inside the wrapper - and make this msn.de.
So when you switch to the German language the menu item appears as "msn DE " and clicking on this opens the webpage msn.de inside the wrapper.
I think I may have modified the Joomfish xml file for menu - but I am fairly sure even with the standard menu xml file you will be able to do this.
http://www.askspain.org
Sometimes the code works
User avatar
six gun
Inshore Fisher
 
Posts: 109
Joined: Thu Jul 31, 2008 9:54 pm
Location: UK

Re: how to get current language in use ?

Postby aclhkaclhk on Sun Jan 16, 2011 2:15 pm

i had similar problem.

(correct me if i am wrong as i am a newbie) the way you suggested will change the language of front page and direct to frontpage every time the lang is changed but not the CURRENT page displayed inside the wrapper. I would like to have the current page translated (of course not necessarily by joomfish).

eg, my application inside wrapper will change lang based on parameter as below
abc.com/order.php?lang=english
abc.com/sales.php?lang=french

is it possible to have joomfish passing a parameter as similar to the above? if not, where could i retrieve the current lang selection value so that i could modify my application to change.

pls advise.
aclhkaclhk
Newbee
 
Posts: 2
Joined: Sun Jan 16, 2011 1:44 pm

Re: how to get current language in use ?

Postby JStoffy on Wed Jan 26, 2011 8:51 pm

Hi,

I have nearly the same question.

I'm using a 3rd party custom code in content module.

e.g. I can get the current menu name with:
$my_current_menu = JSite::getMenu()->getActive()->name;

Can someone give me the code to get the current language?

thanks
JStoffy
JStoffy
Newbee
 
Posts: 4
Joined: Wed Jan 26, 2011 8:36 pm

Re: how to get current language in use ?

Postby vidhyavijay on Fri Feb 18, 2011 2:39 pm

i am using english and french for my site.....1st time english was my default language...after that i converted it to french as defualt at that time some of my pages are missing,when i click the language flags to translate site language.......any help from any one pls.....
vidhyavijay
Newbee
 
Posts: 1
Joined: Fri Feb 18, 2011 2:27 pm


Return to 3rd Party extensions in general

Who is online

Users browsing this forum: No registered users and 1 guest