Forum Archive - Using Joomla Language Files / How to set Joomla language

Using Joomla Language Files / How to set Joomla language
May 9, 2014 10:29 pm by ingmardevos
Hi there, Out website / webstore has quite a lot of Ajax / JSON - popups and responses that don't get translated. Even some buttons and countdown timers. Next to that we would like to see order emails translated. In my opinion it would improve the Gtranslate system greatly if we could add a functionality to also set the Joomla language along with the Gtranslate language selection. Why let all those professional translations go to waste? And this way we can easily send out emails in the right language as well. There are simply TOO much scripts in Virtuemart 2 and extensions that use JSON and AJAX responses. There is no way that we can change the source code in all those spots, keep the functionality and be able to update the extensions without doing the work all over again. Is there any know solution or code that you guys have for this? There has to be a way. If not with setting a cookie or Joomla session parameter maybe with the GT lang server value? Thanks in advance, Ingmar
Re: Using Joomla Language Files / How to set Joomla languag
May 9, 2014 10:46 pm by Edvard
Hi, You may use _SERVER['HTTP_X_GT_LANG'] variable as described in our documentation: https://gtranslate.io/docs/58-gtranslat ... umentation You can set Joomla internal language by detecting the selected language, but think twice when you do that to not make the system try to translate already translated parts. You can try to do that only for ajax requests which do not get translated. Thanks!
Re: Using Joomla Language Files / How to set Joomla languag
May 9, 2014 11:19 pm by ingmardevos
A while ago by email you said to be willing to help us implement this code somewhere to show. Can you still do this? I have no idea how to implement this variable into actual code.
Re: Using Joomla Language Files / How to set Joomla languag
May 9, 2014 11:26 pm by Edvard
You may check this: http://stackoverflow.com/questions/1524 ... using-code
Re: Using Joomla Language Files / How to set Joomla languag
May 12, 2014 8:32 pm by ingmardevos
Thanks Edvard, Can you give me a code example on how to implement this using the Gtranslate language selector?
Re: Using Joomla Language Files / How to set Joomla languag
May 12, 2014 9:09 pm by Edvard
I have already sent you a code example. As I understood you are a webmaster and want to implement it yourself and do not want to make additional payments. Let me know.

SIMILAR TOPICS

GTranslate 3.7.4, Joomla 3.9.3 - doGTranslate is not definedFeb 22, 2019 12:34 pmReplies: 1Post by: oase
Large numbers of crawl errors with double language codeJan 24, 2019 1:43 amReplies: 1Post by: natastna2
Translate website to any specific language, on page loadJan 19, 2019 6:49 amReplies: 1Post by: Leaon7756
Graphic translation for every language is missingDec 19, 2018 7:54 amReplies: 1Post by: Daryl Dixon
How to remove mobile Language Select Button transparencyDec 5, 2018 10:06 pmReplies: 10Post by: JeffTR

Try GTranslate with a free 15 day trial