Forum Archive - <html lang="en" change for each language ?

<html lang="en" change for each language ?
Aug 28, 2012 3:40 pm by lokoman
I'm using this web pro gTranslate http://games312.com/ I would like to know if there is any way to change the label of some miss leguaje by himself gTranslate type <html lang="<php echo $currentlanguage; ?>"
Re: <html lang="en" change for each language ?
Aug 28, 2012 10:46 pm by Edvard
Please check this topic: url-language-code-t320.html
Re: <html lang="en" change for each language ?
Aug 29, 2012 10:31 pm by lokoman
not working. changes in .htaccess: RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L] RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA] RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1 [L,QSA] by RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L] RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L] RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2&glang=$1 [L,QSA] RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1&glang=$1 [L,QSA] changes in .php: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $_GET['glang'];?>" lang="<?php echo $_GET['glang'];?>" xmlns:fb="http://www.facebook.com/2008/fbml"> and not worked, any other possibilities?
Re: <html lang="en" change for each language ?
Sep 22, 2012 10:42 am by lokoman
¿hello?
Re: <html lang="en" change for each language ?
Sep 22, 2012 2:43 pm by Edvard
When you do <?php echo $_GET['glang']; ?> and you are on http://games312.com/ru/ page what do you see? Is it empty, or you get an error, saying that there is no glang index?
Re: <html lang="en" change for each language ?
Sep 22, 2012 4:33 pm by lokoman
Is it empty. The code is in the website now <?php echo $_GET['glang']; ?> </body> </html>
Re: <html lang="en" change for each language ?
Sep 22, 2012 10:07 pm by Edvard
Please post your .htaccess and also add the below code before </body> <!-- <?php print_r($_REQUEST); ?> -->
Re: <html lang="en" change for each language ?
Apr 25, 2013 9:31 am by lokoman
<?php print_r($_REQUEST); ?> [auto_detect_user] => 0 [main_lang] => en if I put it as follows <?php echo $_GET['main_lang']; ?> not translated alone results in all pages. the language en
Re: <html lang="en" change for each language ?
May 1, 2013 3:44 pm by Edvard
Please go to http://games312.com/gtranslate/translat ... u&glang=ru and do <?php print_r($_REQUEST); ?>. What do you see? If you see glang variable populated, then you have a wrong .htaccess file and you haven't added glang variable there as described.
Re: <html lang="en" change for each language ?
May 6, 2013 8:27 am by lokoman
.htaccess: RewriteEngine on # gtranslate config RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L] RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L] RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2&glang=$1 [L,QSA] RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1&glang=$1 [L,QSA] # gtranslate config end .htaccess with: <?php print_r($_REQUEST); ?> 152365615.1641059900.1367827829.1367827829.1367827829.1 [__utmb] => 152365615.8.9.1367828094483 [__utmc] => 152365615 [__utmz] => ) with: <?php echo $_GET['glang'];?> nothing.. both together: fdafd1212aaf11c54485efdbf0299cae [__utma] => 152365615.1641059900.1367827829.1367827829.1367827829.1 [__utmb] => 152365615.22.9.1367828597148 [__utmc] => 152365615 [__utmz] => ) RU returns both ru :?
Re: <html lang="en" change for each language ?
May 8, 2013 3:03 pm by Edvard
I'm absolutely confused. Please do the following: 1. Create test.php file in your html rood directory, so when you open http://games312.com/test.php it will not show 404 not found error. 2. Place this content inside: <?php print_r($_REQUEST); Let me know when it is done, so I can test.
Re: <html lang="en" change for each language ?
May 9, 2013 5:34 am by lokoman
the file is created and it seems that returns the language, I only need the base language. passed a very curious thing, I also confused .. I added the tag to the web. lang="<?php echo $_GET['glang'];?>" here return es: http://games312.com/es/ here return empty: http://games312.com/es/king-of-fighters-wing-18 here return empty: http://games312.com/es/tag/fighting it seems that when you have more than one folder skip does not return the result. :?
Re: <html lang="en" change for each language ?
May 9, 2013 3:06 pm by Edvard
Are you sure that the other pages use the same template where you have added the code? May be there is some caching system? The best way to check is to add this code in the end of index.php file: <!-- glang: <?php echo $_GET['glang']; ?> --> Here I presume that all pages are being open through the index.php file. It really depends on your site architecture.

SIMILAR TOPICS

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
Change language automaticallyNov 26, 2018 9:29 pmReplies: 3Post by: Antilb

Try GTranslate with a free 15 day trial