FAQ for removing unsupported languages
Feb 7, 2013 7:39 pm by earlyworm
Feb 7, 2013 7:39 pm by earlyworm
Dear GTranslate,
after a mail from my Server provider I have recognize that there are still some problems with the GTranslate Pro Version. The problems still have to do with the cache and to remove not used languages. This problems was also a lot of time named here in the forum but they are still exists. Also my provider informs me that Gtranslate try to connect more than 100 time per second. Because of this the provider said that this problem have to fix otherwise GTranslate has to removed from the website. I'm sure that also you dont want that a provider force to remove GTranslate from a website.
The questions about to remove a language was so many times ask in the forum that I wondering that it is not part of the FAQ. Target of this threat is a clear instruction for all other forum user what they have to do if they have the same problems. At the end i will write everything together and post it in a FAQ: How to remove unused language thread. But of course I need the GTranslate Support to get all answer correctly. So I will wrote down some questions which must be answer by Gtranslate. Ok Lets start.
1. Question(s): About GTranslate Pro Versions:
First of all the user have to now if he have the newest GTranslation Pro Version. Otherwise he must installed the newest once. Right?
Where can I see my current version of the GTranslate pro version on my site?
Where on the GTranslate website I can see the current version of GTranslate Pro? What are the changes to the earlier version? Where the user can find the Release notes?
When a user regconize that he didnt't have the newest version, where can he get the newest one?
Are the instruction to install the update are included if you send the newest version?
2. Question(s): Remove a language.
GTranslate Pro caches all the translations in this folder:
/plugins/system/gtranslate/gtranslate/cache
For every language there is a subfolder. Currently there are these subfolders:
it|fr|de|sv|no|fi|en|af|ar|az|be|bg|bn|ca|cs|cy|el|es|et|eu|fa|ga|gl|gu|hi|hr|ht|hu|hy|id|is|it|iw|ja|ka|kn|ko|lt|lv|mk|ms|mt|nl|pl|pt|ro|ru|sk|sl|sq|sr|sw|ta|te|th|tl|tr|uk|ur|vi|yi|zh-CN|zh-TW
The problem is, that these folders containing a huge amount of files. Currently I have for example only 5 languages and 120000 files in these 5 folders. These huge numbers of file can provide some problems.
An other problem is that in the standard installation of Gtranslate the visitors can user every language they want. Not only the language the administrator select in Module are available, all of them.
For example if you have a website like this:
http://www.mywebsite.com/article-1
all the named translations are available. Just write in the browser:
http://www.mywebsite.com/it/article-1
http://www.mywebsite.com/de/article-1
http://www.mywebsite.com/fr/article-1
http://www.mywebsite.com/sv/article-1
But mostly nobody want to support all languages. They are only generate files in the cache folder. It is important to delete languages forever from the website. The questions is: How to do that.
In another thread GTranslate write
“
Hi, You need to write a rule to redirect unwanted languafes to the homepage.Here is an example
RewriteRule ^(fr|de|it)/(.*)$ /$1 [R=301,L]
”
That means if you, for example, only want to support Italian translations you have to write put this line into your .htaccess file:
RewriteRule ^(it|fr|de|sv|no|fi|en|af|ar|az|be|bg|bn|ca|cs|cy|el|es|et|eu|fa|ga|gl|gu|hi|hr|ht|hu|hy|id|is|it|iw|ja|ka|kn|ko|lt|lv|mk|ms|mt|nl|pl|pt|ro|ru|sk|sl|sq|sr|sw|ta|te|th|tl|tr|uk|ur|vi|yi|zh-CN|zh-TW)/(.*)$ /$1 [R=301,L]
GTranslate is this right? Because it didnt work on my site so I have to remove this line from the .htaccess file.
Is is the best to remove all the subfolders from the not supported languages in the cache folder?
3. Question(s): Google translations:
My provider said that there are a lot of connections are make to Google.
Is it possible to reduce the number of these connections?
I once a site is translated full in one language, GTranslate never call Google for this site again, because the site is in the cache, right? So if every site is once call in a language there no more calling to google?
Is it possible that google don't answer translation request? Because new sites from me are not translated.
Thanks for your answers. Hope that we will find all the answers to the open questions.
Regards
Holger
Re: FAQ for removing unsupported languages
Feb 8, 2013 5:21 pm by Edvard
Feb 8, 2013 5:21 pm by Edvard
Hi,
Please find my answers below:
1. You should receive an email when there is a new version available with the release notes and update instruction. If you would like to see the current version you can select a language and check the source code of your page, you will see the GTranslate Pro version in the end of the page as a comment.
2. Yes, it is correct. If you just want to keep some of the languages you can mention them by a list. We provide the easiest solution for customers. We try to find which will be shorter, to disable all languages, then enable some of them, or disable some of the languages. We can do the configuration for you if you are having issues with it.
3. It is OK. Over time when everything on your site is translated and cached the number of connections will be small or there won't be connections at all. If you suspect that Google doesn't respond to you with the translation you can contact us and we will try to find out what is the reason for that using the debug option. It can be that your provider blocks your connections or some other reason.
Hope I have clarified. Thanks!
BTW. If your provider is having problems because of many cache files or connections to Google you can use our Enterprise version which doesn't install any software on your server.
Re: FAQ for removing unsupported languages
Apr 1, 2014 6:56 am by yasirfarooqui
Apr 1, 2014 6:56 am by yasirfarooqui
I faced the same issue as discussed in #2, one of my url's were similar to language codes and I was having issue with it. Instead of providing a list of languages which you does not require, there is an alternative way where you can mention only the languages you require. So for example in order to enable Gtranslate Pro, you have to write following lines in your .htaccess file:
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]
You can modify these rules to redirect only the required languages to the translation file. So for example if you want to support only de, it, en then:
RewriteRule ^(en|de|it)/(en|de|it)/(.*)$ /$1/$3 [R=301,L]
RewriteRule ^(en|de|it)/(en|de|it)$ /$1/ [R=301,L]
RewriteRule ^(en|de|it)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2&glang=$1 [L,QSA]
RewriteRule ^(en|de|it)$ /gtranslate/translate.php?lang=$1&glang=$1 [L,QSA]
Re: FAQ for removing unsupported languages
Apr 1, 2014 1:24 pm by Yana
Apr 1, 2014 1:24 pm by Yana
Dear Yasirfarooqui ,
Yes, if you are using GTranslate Pro general version, you can modify the redirection rules and replace [a-z]{2}|zh-CN|zh-TW with the language codes which you want to use.
SIMILAR TOPICS
How do I add Indian languages in Drupal GTranslate? | Sep 18, 2011 6:10 am | Replies: 26 | Post by: rag_gupta |
Code to use in Google Analytics to track languages | Nov 16, 2015 10:46 am | Replies: 9 | Post by: lucysadler |
Different languages - different banners | Mar 27, 2018 11:20 am | Replies: 3 | Post by: samdo |
What happens if site already has two or more languages ? | Sep 14, 2017 5:54 am | Replies: 7 | Post by: Sarge2017 |
Is there any usage statistics for selected languages? | Apr 7, 2016 8:29 pm | Replies: 9 | Post by: lesufomu |