<html lang="en" change for each language ?
Aug 28, 2012 3:40 pm by lokoman
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
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
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
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
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
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
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
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
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
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
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
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
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 code | Jan 24, 2019 1:43 am | Replies: 1 | Post by: natastna2 |
Translate website to any specific language, on page load | Jan 19, 2019 6:49 am | Replies: 1 | Post by: Leaon7756 |
Graphic translation for every language is missing | Dec 19, 2018 7:54 am | Replies: 1 | Post by: Daryl Dixon |
How to remove mobile Language Select Button transparency | Dec 5, 2018 10:06 pm | Replies: 10 | Post by: JeffTR |
Change language automatically | Nov 26, 2018 9:29 pm | Replies: 3 | Post by: Antilb |