PDA

View Full Version : Solved Error can not translate all threads and posts



haiduongbk
05-04-11, 20:22
Forum: windowsz.net I can click on the flag to select language, for example English, shall be as follows:-the original Link link:

http://windowsz.net/showthread.php/22507-hotfix-windows-7-pre-SP2-version-7601.21649?p=57570
-Link after the click language translations into English:

http://windowsz.net/showthread.php/22507-hotfix-windows-7-pre-SP2-version-7601.21649?p=57570&language=en
And you can see, the link instead? language = en to translate then it turned into & language = en, Measured it to is impossible to translate,-the second problem: at forum home I put: Languages Forum (Powered by ....But after translating it into: Languages/u200b/u200bForum (Powered by ...-The you please visit my website: windowsz.net and check out and help me this problem, thanks

kamilkurczak
06-04-11, 08:36
about second issue:

1. open, edit and make a copy of this file:
forum root/includes/vbenterprisetranslator_functions.php
2. in this file find:

$result =& str_replace('\u003d', '=', str_replace ('\u0026', '&', $result));

3. and replace with:

$result =& str_replace(array('\u003d','\u0026', '\u200b'), array('=', '&', ' '), $result);
4. save and test it.

about first issue:
did you install some new mod? maybe there is a conflict with mod. before everyting works good?
how to check conflict? just enable all mods without vBET and check links again.

haiduongbk
06-04-11, 09:33
I did so, but it still does not work with me for that matter. When I translated by Dropdown menu, it works normally, but when translated by click on the flag, it does not work. So that's what bugs? I'm using vBulletin 4.1.2. Help me

kamilkurczak
06-04-11, 19:10
what about this issue:

\u200b
is still after translation?
are you paste code from my previous post in good place? this code should fix this issue.

About issue with flags - please try to find a conflict with some mod.
please disable all mods without vBET and try to find this issue again.
also - you can use vBET urls in SEO form.
to do it just go to admincp->vBET->main and set Translation links type to Create URL's according to SEO link consensus (i.e. '/en/address'). After that upload into your main forum our .htaccess file from vBET pack.

haiduongbk
06-04-11, 20:37
- I've disabled all of the MODS on the board and to vBET operation, but it still fails on. - Error \\ u200b still occur. However the protocol to vBET url in SEO it worked for me. Thanks kamilkurczak

haiduongbk
06-04-11, 20:49
kamilkurczak: I have indexed pages from old links type (with language =) and want switch to SEO links-what to do?First make the SEO links available. After that add this rule to. htaccess (before SEO rules):

RewriteCond %{QUERY_STRING} (hl=|language=)(zh-TW|zh-CN|..)
RewriteRule ^(.*)$ http://%{HTTP_HOST}/%2/$1? [L,R=301]
I added this code in htaccess but it does not work, the link will die. can you give me a more complete code is not?

kamilkurczak
06-04-11, 21:49
example of .htaccess file:

RewriteEngine On



#RULES for SEO translation links without any SEO engine (on raw vBulletin links)
#If you are using vB 'Mod Rewrite Friendly URLs' then put those rules JUST BEFORE vB rules
RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|ur|vi|cy|yi)/archive/index.php/(.*)?$ archive/index.php?/$2&language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|ur|vi|cy|yi)/$ index.php?language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|ur|vi|cy|yi)/(.*)?$ $2?language=$1 [QSA]

about second issue: are you sure that you paste my code in the good place?
pleae paste here a part of this file with this change.

haiduongbk
07-04-11, 02:40
File vbenterprisetranslator_functions.php of cars


function vbet_googleTranslation(&$translationURL, &$tableForResults) {
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $translationURL);
curl_setopt($connection, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)');
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($connection, CURLOPT_REFERER, VBET_ACTUAL_PATH_WITH_ALL);
$result = curl_exec($connection);
curl_close($connection);
$result =& str_replace(array('\u003d','\u0026', '\u200b'), array('=', '&', ' '), $result);
preg_match_all('/{"translatedText":"(.*?)"}/', $result, $unwrappedResult, PREG_SET_ORDER);
$size = sizeof($unwrappedResult);
for($i = 0; $i < $size; ++$i) {
$tableForResults[] = $unwrappedResult[$i][1];
}
}

You can see I changed the code as you said. However it still does not work with the Protocol languge =. But I don't care about that issue anymore, I am interested in using SEO URLs like you said and it worked for me without error. I'm just looking forward to it a preliminary figure. htaccess to allow it to go into url SEO = languge. I've added:

RewriteCond %{QUERY_STRING} (hl=|language=)(zh-TW|zh-CN|..)
RewriteRule ^(.*)$ http://%{HTTP_HOST}/%2/$1? [L,R=301]
In the file htacess but it does not work. Here is the code. htacess my:

RewriteEngine On
Order Allow,Deny
Deny from 74.125.127.95
Deny from 217.172.179.50
Deny from 10.0.8.254
Allow from all
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|sq|ca|et|tl|gl|hi|id|lv|lt|mt|sl|uk|vi|cy|yi)/archive/index.php/(.*)?$ archive/index.php?/$2&language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/$ index.php?language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/(.*)?$ $2?language=$1 [QSA]
RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
DirectoryIndex forum.php index.php index .php3 messagebrd.pl index.html index.htm
RewriteBase /
RewriteCond %{HTTP_HOST} !^windowsz\.net$ [NC]
RewriteRule ^(.*)$ http://windowsz.net/$1 [R=301,L]
ErrorDocument 404 HTTP ERROR 404 (http://windowsz.net/indexa.htm)
ErrorDocument 401 HTTP ERROR 404 (http://windowsz.net/indexa.htm)
ErrorDocument 403 HTTP ERROR 404 (http://windowsz.net/indexa.htm)
ErrorDocument 500 HTTP ERROR 404 (http://windowsz.net/indexa.htm)
And I add the code into SEO url = change languge:

RewriteEngine On
Order Allow,Deny
Deny from 74.125.127.95
Deny from 217.172.179.50
Deny from 10.0.8.254
Allow from all
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|sq|ca|et|tl|gl|hi|id|lv|lt|mt|sl|uk|vi|cy|yi)/archive/index.php/(.*)?$ archive/index.php?/$2&language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/$ index.php?language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/(.*)?$ $2?language=$1 [QSA]
RewriteCond %{QUERY_STRING} (hl=|language=)(zh-TW|zh-CN|..)
RewriteRule ^(.*)$ http://%{HTTP_HOST}/%2/$1? [L,R=301]
RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
DirectoryIndex forum.php index.php index .php3 messagebrd.pl index.html index.htm
RewriteBase /
RewriteCond %{HTTP_HOST} !^windowsz\.net$ [NC]
RewriteRule ^(.*)$ http://windowsz.net/$1 [R=301,L]
ErrorDocument 404 HTTP ERROR 404 (http://windowsz.net/indexa.htm)
ErrorDocument 401 HTTP ERROR 404 (http://windowsz.net/indexa.htm)
ErrorDocument 403 HTTP ERROR 404 (http://windowsz.net/indexa.htm)
ErrorDocument 500 HTTP ERROR 404 (http://windowsz.net/indexa.htm)
It did not work!

kamilkurczak
07-04-11, 09:52
ok here you have example of .htaccess if you DON'T USE vBSEO:


RewriteEngine On
Order Allow,Deny
Deny from 74.125.127.95
Deny from 217.172.179.50
Deny from 10.0.8.254
Allow from all

RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|sq|ca|et|tl|gl|hi|id|lv|lt|mt|sl|uk|vi|cy|yi)/archive/index.php/(.*)?$ archive/index.php?/$2&language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/$ index.php?language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/(.*)?$ $2?language=$1 [QSA]


DirectoryIndex forum.php index.php index .php3 messagebrd.pl index.html index.htm
RewriteBase /
RewriteCond %{HTTP_HOST} !^windowsz\.net$ [NC]
RewriteRule ^(.*)$ http://windowsz.net/$1 [R=301,L]
ErrorDocument 404 HTTP ERROR 404
ErrorDocument 401 HTTP ERROR 404
ErrorDocument 403 HTTP ERROR 404
ErrorDocument 500 HTTP ERROR 404

but I was on your site and translation works good!
example:
http://windowsz.net/ja/showthread.php/4622-%E3%82%A2%E3%83%B3%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%A9%E3%81%AF%E3%80%812011%E5%B9%B4%EF%BC%9A%E5%BE%B9%E5%BA%95%E7%9A%84%E3%81%AB%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%82%92%E5%89%8A%E9%99%A4%E3%81%99%E3%82%8B?p=57864#post57864

haiduongbk
08-04-11, 04:35
ok, so no need to add this code:

RewriteCond %{QUERY_STRING} (hl=|language=)(zh-TW|zh-CN|..)
RewriteRule ^(.*)$ http://%{HTTP_HOST}/%2/$1? [L,R=301]
Thank you very much, problem solved

kamilkurczak
08-04-11, 08:10
thanks for your confirmation

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Multilingual forum supported by vBET Translator 4.9.99