<html lang="en" change for each language ?

Popular automatic website translation tool

<html lang="en" change for each language ?

Postby lokoman » Tue Aug 28, 2012 7:40 pm

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; ?>"
lokoman
 
Posts: 61
Joined: Sat Dec 17, 2011 3:49 am

Re: <html lang="en" change for each language ?

Postby Edvard » Wed Aug 29, 2012 2:46 am

Please check this topic: url-language-code-t320.html
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4184
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: <html lang="en" change for each language ?

Postby lokoman » Thu Aug 30, 2012 2:31 am

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?
lokoman
 
Posts: 61
Joined: Sat Dec 17, 2011 3:49 am

Re: <html lang="en" change for each language ?

Postby lokoman » Sat Sep 22, 2012 2:42 pm

¿hello?
lokoman
 
Posts: 61
Joined: Sat Dec 17, 2011 3:49 am

Re: <html lang="en" change for each language ?

Postby Edvard » Sat Sep 22, 2012 6:43 pm

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?
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4184
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: <html lang="en" change for each language ?

Postby lokoman » Sat Sep 22, 2012 8:33 pm

Is it empty.
The code is in the website
now
<?php echo $_GET['glang']; ?>
</body>
</html>
lokoman
 
Posts: 61
Joined: Sat Dec 17, 2011 3:49 am

Re: <html lang="en" change for each language ?

Postby Edvard » Sun Sep 23, 2012 2:07 am

Please post your .htaccess and also add the below code before </body>

<!--
<?php print_r($_REQUEST); ?>
-->
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4184
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: <html lang="en" change for each language ?

Postby lokoman » Thu Apr 25, 2013 1:31 pm

<?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
lokoman
 
Posts: 61
Joined: Sat Dec 17, 2011 3:49 am

Re: <html lang="en" change for each language ?

Postby Edvard » Wed May 01, 2013 7:44 pm

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.
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4184
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: <html lang="en" change for each language ?

Postby lokoman » Mon May 06, 2013 12:27 pm

.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 :?
lokoman
 
Posts: 61
Joined: Sat Dec 17, 2011 3:49 am

Re: <html lang="en" change for each language ?

Postby Edvard » Wed May 08, 2013 7:03 pm

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:
Code: Select all
<?php
print_r($_REQUEST);


Let me know when it is done, so I can test.
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4184
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: <html lang="en" change for each language ?

Postby lokoman » Thu May 09, 2013 9:34 am

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. :?
lokoman
 
Posts: 61
Joined: Sat Dec 17, 2011 3:49 am

Re: <html lang="en" change for each language ?

Postby Edvard » Thu May 09, 2013 7:06 pm

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:

Code: Select all
<!-- 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.
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4184
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux