Elxis CMS Forum

Support => Language => Topic started by: regi168 on April 15, 2011, 08:12:14

Title: publish new language - How to check Third language proper setting? (Solved)
Post by: regi168 on April 15, 2011, 08:12:14
I  published two languages,   「english」 and 「chinese_tranditional」.  both languages switch to each other very good.   (seo pro has enabled.)

Now try to publish one more 「 Chinese_simplified」,   the chinese_tranditional is default.

In mainmenu setting only

Home  lang1    /    compoent - index.php?option=com_reservations&Itemid=45     /  chinese_tranditional
Home  lang2    /    compoent - index.php?option=com_reservations&Itemid=45     /  english
Home  lang3    /    compoent - index.php?option=com_reservations&Itemid=45     /  chinese_simplified
Hotel search lang1 /   link-url - http://www.regi168.com/en/reservations                   /  chinese_tranditional
Hotel search lang2 /   link-url - http://www.regi168.com/reservations                        /  english
Hotel search lang3 /   link-url - http://www.regi168.com/zh-hans/reservations            /   chinese_simplified     

when I published the third  chinese_simplified, if click the flag (chinese_simplified), nothing change but  only go back to default language. 


if I disable the other two languages, only enable chinese_simplified.   the chinese_simplified will comes out and works. 


I read other topic in our forum,  try to fix the .htaccess.   there is no chinese_simplified.  so I add it in the last line
Code: [Select]
RewriteBase /

# Uncomment the line bellow if you use static cache in order to deny direct access to cached files.
#RewriteRule ^cache/static/(.*)$ - [F]

#
# Language Handling
# You may remove the languages that you dont need or add other languages not listed here
# For the proper language names and the iso 639 code languages consider includes/Core/locale.php file
# If you wish to use chinese you should add:
# chinese_traditional : zh-Hant,
# chinese_simplified : zh-Hans
#

RewriteCond %{QUERY_STRING} !mylang=[arabic|armenian|bosnian|creole|croatian|danish|dutch|english|french|german|greek|hebrew|indonesian|italian|japanese|latvian|lithuanian|persian|polish|romanian|russian|serbian|spanish|srpski|turkish|vietnamese]{2,}

RewriteRule ^([ar]{2})/(.*)$ /index.php?mylang=arabic [QSA,L]
RewriteRule ^([hy]{2})/(.*)$ /index.php?mylang=armenian [QSA,L]
RewriteRule ^([bs]{2})/(.*)$ /index.php?mylang=bosnian [QSA,L]
#RewriteRule ^([pt\-BR]{5})/(.*)$ /index.php?mylang=brazilian [QSA,L]
RewriteRule ^([ht]{2})/(.*)$ /index.php?mylang=creole [QSA,L]
RewriteRule ^([hr]{2})/(.*)$ /index.php?mylang=croatian [QSA,L]
RewriteRule ^([da]{2})/(.*)$ /index.php?mylang=danish [QSA,L]
RewriteRule ^([nl]{2})/(.*)$ /index.php?mylang=dutch [QSA,L]
RewriteRule ^([en]{2})/(.*)$ /index.php?mylang=english [QSA,L]
RewriteRule ^([fr]{2})/(.*)$ /index.php?mylang=french [QSA,L]
RewriteRule ^([de]{2})/(.*)$ /index.php?mylang=german [QSA,L]
RewriteRule ^([el]{2})/(.*)$ /index.php?mylang=greek [QSA,L]
RewriteRule ^([he]{2})/(.*)$ /index.php?mylang=hebrew [QSA,L]
RewriteRule ^([id]{2})/(.*)$ /index.php?mylang=indonesian [QSA,L]
RewriteRule ^([it]{2})/(.*)$ /index.php?mylang=italian [QSA,L]
RewriteRule ^([ja]{2})/(.*)$ /index.php?mylang=japanese [QSA,L]
RewriteRule ^([lv]{2})/(.*)$ /index.php?mylang=latvian [QSA,L]
RewriteRule ^([lt]{2})/(.*)$ /index.php?mylang=lithuanian [QSA,L]
RewriteRule ^([fa]{2})/(.*)$ /index.php?mylang=persian [QSA,L]
RewriteRule ^([pl]{2})/(.*)$ /index.php?mylang=polish [QSA,L]
RewriteRule ^([ro]{2})/(.*)$ /index.php?mylang=romanian [QSA,L]
RewriteRule ^([ru]{2})/(.*)$ /index.php?mylang=russian [QSA,L]
RewriteRule ^(sr)/(.*)$ /index.php?mylang=serbian [QSA,L]
RewriteRule ^([es]{2})/(.*)$ /index.php?mylang=spanish [QSA,L]
RewriteRule ^(rs)/(.*)$ /index.php?mylang=srpski [QSA,L]
RewriteRule ^([tr]{2})/(.*)$ /index.php?mylang=turkish [QSA,L]
RewriteRule ^([vi]{2})/(.*)$ /index.php?mylang=vietnamese [QSA,L]
 RewriteRule ^([zh-Hans]{2})/(.*)$ /index.php?mylang=chinese_simplified [QSA,L] -------------------add this

I cannot even enter my site, only  got follow messages!


Internal Server Error
Code: [Select]
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

It seems some setting are wrong, how to let the third language comes out ? 
 





 
Title: Re: publish new language - How to check Third language proper setting?
Post by: webgift on April 18, 2011, 23:07:27
Issue fixed.
For anyone who face the same problem just replace the .htaccess file with the below code. :

Code: [Select]
##
# Elxis 2009.2 htaccess file
# Copyright (C) 2006-2010 Elxis.org. All rights reserved.
# License: http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Elxis CMS is a Free Software
##

## Uncomment the following line, if it produces erors, comment it again
# Options -Indexes +FollowSymLinks
#php_flag short_open_tag 0
php_value short_open_tag 0
#
#  mod_rewrite in use
#

RewriteEngine On

# The following line tells the web server where your Elxis installation is located in relation
# to the web server root directory. By default this is set to the www root folder ( RewriteBase / ).
# If you have installed Elxis in a sub-folder then set this path properly.
# For example if your elxis site is accessible via this URL http://www.mysite.com/elxis/
# You should set: RewriteBase /elxis/

RewriteBase /

# Uncomment the line bellow if you use static cache in order to deny direct access to cached files.
#RewriteRule ^cache/static/(.*)$ - [F]

#
# Language Handling
# You may remove the languages that you dont need or add other languages not listed here
# For the proper language names and the iso 639 code languages consider includes/Core/locale.php file
# If you wish to use chinese you should add:
#chinese_traditional : zh-Hant
#chinese_simplified : zh-Hans
#

RewriteCond %{QUERY_STRING} !mylang=[arabic|armenian|bosnian|creole|croatian|danish|dutch|english|french|german|greek|hebrew|indonesian|italian|japanese|latvian|lithuanian|persian|polish|romanian|russian|serbian|spanish|srpski|turkish|vietnamese|chinese_simplified|chinese_tranditional]{2,}

RewriteRule ^([ar]{2})/(.*)$ /index.php?mylang=arabic [QSA,L]
RewriteRule ^([hy]{2})/(.*)$ /index.php?mylang=armenian [QSA,L]
RewriteRule ^([bs]{2})/(.*)$ /index.php?mylang=bosnian [QSA,L]
#RewriteRule ^([pt\-BR]{5})/(.*)$ /index.php?mylang=brazilian [QSA,L]
RewriteRule ^([ht]{2})/(.*)$ /index.php?mylang=creole [QSA,L]
RewriteRule ^([hr]{2})/(.*)$ /index.php?mylang=croatian [QSA,L]
RewriteRule ^([da]{2})/(.*)$ /index.php?mylang=danish [QSA,L]
RewriteRule ^([nl]{2})/(.*)$ /index.php?mylang=dutch [QSA,L]
RewriteRule ^([en]{2})/(.*)$ /index.php?mylang=english [QSA,L]
RewriteRule ^([fr]{2})/(.*)$ /index.php?mylang=french [QSA,L]
RewriteRule ^([de]{2})/(.*)$ /index.php?mylang=german [QSA,L]
RewriteRule ^([el]{2})/(.*)$ /index.php?mylang=greek [QSA,L]
RewriteRule ^([he]{2})/(.*)$ /index.php?mylang=hebrew [QSA,L]
RewriteRule ^([id]{2})/(.*)$ /index.php?mylang=indonesian [QSA,L]
RewriteRule ^([it]{2})/(.*)$ /index.php?mylang=italian [QSA,L]
RewriteRule ^([ja]{2})/(.*)$ /index.php?mylang=japanese [QSA,L]
RewriteRule ^([lv]{2})/(.*)$ /index.php?mylang=latvian [QSA,L]
RewriteRule ^([lt]{2})/(.*)$ /index.php?mylang=lithuanian [QSA,L]
RewriteRule ^([fa]{2})/(.*)$ /index.php?mylang=persian [QSA,L]
RewriteRule ^([pl]{2})/(.*)$ /index.php?mylang=polish [QSA,L]
RewriteRule ^([ro]{2})/(.*)$ /index.php?mylang=romanian [QSA,L]
RewriteRule ^([ru]{2})/(.*)$ /index.php?mylang=russian [QSA,L]
RewriteRule ^(sr)/(.*)$ /index.php?mylang=serbian [QSA,L]
RewriteRule ^([es]{2})/(.*)$ /index.php?mylang=spanish [QSA,L]
RewriteRule ^(rs)/(.*)$ /index.php?mylang=srpski [QSA,L]
RewriteRule ^([tr]{2})/(.*)$ /index.php?mylang=turkish [QSA,L]
RewriteRule ^([vi]{2})/(.*)$ /index.php?mylang=vietnamese [QSA,L]
RewriteRule ^(zh-Hans)/(.*)$ /index.php?mylang=chinese_simplified [QSA,L]
RewriteRule ^(zh-Hant)/(.*)$ /index.php?mylang=chinese_traditional [QSA,L]

#
# Exclude Files and directories
#

RewriteRule ^(administrator/|bridges/|cache/|components/|editor/|help/|images/|includes/|language/|mambots/|media/|modules/|templates/|tmpr/) - [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php

#
## Security rules. Comment them if they cause problems to your site
#

# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
# This rule is commented because it may cause some Elxis features to not work!
# RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
Title: Re: publish new language - How to check Third language proper setting?
Post by: regi168 on April 20, 2011, 04:16:02

use for  Chinese_tranditiona / Chinese_simplified / English / Japanese  4 languages.

It's  really  really very  helpful !!

Thanks~
Title: Re: publish new language - How to check Third language proper setting? (Solved)
Post by: webgift on April 20, 2011, 10:01:04
You are welcome ;)
Note :  Chinese_simplified and chinese_tranditional languages hasn't set by default so with the .htaccess file below you can publish Chinese_simplified , chinese_tranditional  and as many other languages you desire using SEO PRO extension for Elxis 2009.x.