Do you mean i have to keep Location: http://your_domain/fr/ in common.php
but change RewriteRule ^([^/]{2})/(.*)$ $2?force_lng=$1&%{QUERY_STRING} [L] in htaccess?
Multiple Languages
Re: Multiple Languages
You should have URLs like
http://www.domain.com/fr/category/lesbian/
100% of all redirects\language stuff is in 3 places
1. .htaccess
2. common.php
3. language template
feel free to edit it, just make a backup.
http://www.domain.com/fr/category/lesbian/
100% of all redirects\language stuff is in 3 places
1. .htaccess
2. common.php
3. language template
feel free to edit it, just make a backup.
Don't forget to run script update
Re: Multiple Languages
I found the solution:
But there is another problem. I added all categories translation to languages template. But there are a lot of translations ( 690 categories x 18 languages ).
I notice if the language template is having more than about 2425 lines i get this error when i go to any page:
Parse error: syntax error, unexpected '<' in /home/user/domain.com/www/scj/tube/index.php(0) : eval()'d code on line 2435
The problem doesn't come from a syntax error. The problem is that it has more than 2425 lines in language template.
How to fix this?
Code: Select all
if (!strstr($_SERVER['HTTP_REFERER'], 'domain.com') and !$_GET['force_lng']) {
$str = $_SERVER['REQUEST_URI']; $str2 = substr($str, 3);
if (strstr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'fr')) {
header("Location: http://www.domain.com/fr".$str."");
exit;
} elseif (strstr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'de')) {
header("Location: http://www.domain.com/fr".$str."");
exit;
}
}
I notice if the language template is having more than about 2425 lines i get this error when i go to any page:
Parse error: syntax error, unexpected '<' in /home/user/domain.com/www/scj/tube/index.php(0) : eval()'d code on line 2435
The problem doesn't come from a syntax error. The problem is that it has more than 2425 lines in language template.
How to fix this?
Re: Multiple Languages
It does.Parse error: syntax error, nexpected '<' in /home/user/domain.com/www/scj/tube/index.php(0) : eval()'d code on line 2435
The problem doesn't come from a syntax error. The problem is that it has more than 2425 lines in language template.
100%.
Don't forget to run script update
Re: Multiple Languages
Ok i understand what the problem is:
When you go to Rotation - Templates and edit languages template:
If you copy/paste more than 2500 lines ( or something like that) and click on save it will save just the first 2500 lines, not more.
So the template get cut at some line, i can't save the whole tempate.
How to save a template with more more lines?
When you go to Rotation - Templates and edit languages template:
If you copy/paste more than 2500 lines ( or something like that) and click on save it will save just the first 2500 lines, not more.
So the template get cut at some line, i can't save the whole tempate.
How to save a template with more more lines?
Re: Multiple Languages
There's only 1 limit - the size of the field - 65,535 bytes
You can make it bigger
ALTER TABLE `rot_pages` CHANGE `template` `template` MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL
You can make it bigger
ALTER TABLE `rot_pages` CHANGE `template` `template` MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL
Don't forget to run script update
Re: Multiple Languages
Hello,
The problem is the language template is very big now and if I understand right it loads each time a page load. Would this idead work to reduce the load time?
I include in each template:
If HTTP_ACCEPT_LANGUAGE = fr then <!--INCLUDE_TEMPLATE_languageFR--> elseif HTTP_ACCEPT_LANGUAGE = de then <!--INCLUDE_TEMPLATE_languageDE--> etc...
Thank you.
The problem is the language template is very big now and if I understand right it loads each time a page load. Would this idead work to reduce the load time?
I include in each template:
If HTTP_ACCEPT_LANGUAGE = fr then <!--INCLUDE_TEMPLATE_languageFR--> elseif HTTP_ACCEPT_LANGUAGE = de then <!--INCLUDE_TEMPLATE_languageDE--> etc...
Thank you.
Re: Multiple Languages
You have 10-15 languages
let's say you have 100 categories and 50 elements of design
that's 15*150 = 2250 maximum
So i've create a php file with 4000 lines
Execution time - 0.001 sec
Where do you see that load ?
let's say you have 100 categories and 50 elements of design
that's 15*150 = 2250 maximum
So i've create a php file with 4000 lines
Execution time - 0.001 sec
Where do you see that load ?
Don't forget to run script update
Re: Multiple Languages
I have 700 categories with 18 languages, but i could compress the file so it's doing only 300kb.
The only problem is to have <category order=alphabet> translations order in alphabet.
The only problem is to have <category order=alphabet> translations order in alphabet.
Re: Multiple Languages
You can save it as 18 files (parts) and include necessary file based on current language.
Now you have all the category names in your php code, right ?
Now you have all the category names in your php code, right ?
Don't forget to run script update







