Elxis CMS Forum

Support => Language => Topic started by: active on March 02, 2009, 00:28:54

Title: seo pro and problem for select language
Post by: active on March 02, 2009, 00:28:54
hi

i am use elxis 2008.1 and seo pro for show page .
i use 3 language in website : english , persian , arabic but arabic is edit persian language ! now when language select is arabic show url :

www.akairan.com// but select persian or english : www.akairan.com/en/   or www.akairan.com/fa/

where is the problem ?

www.akairan.com is website !

thx
Title: Re: seo pro and problem for select language
Post by: datahell on March 02, 2009, 11:30:43
The problem is that there is no iso639 code for just "arabic".

Here are the elxis language/iso639 code pairs for Arabic languages:
'arabic_YE' => 'ar-YE',
'arabic_algeria' => 'ar-DZ',
'arabic_bahrain' => 'ar-BH',
'arabic_egypt' => 'ar-EG',
'arabic_iraq' => 'ar-IQ',
'arabic_jordan' => 'ar-JO',
'arabic_kuwait' => 'ar-KW',
'arabic_lebanon' => 'ar-LB',
'arabic_libya' => 'ar-LY',
'arabic_morocco' => 'ar-MA',
'arabic_oman' => 'ar-OM',
'arabic_qatar' => 'ar-QA',
'arabic_saudiarabia' => 'ar-SA',
'arabic_syria' => 'ar-SY',
'arabic_tunisia' => 'ar-TN',
'arabic_uae' => 'ar-AE',

Solution:
Either rename your language to an existing one or Edit the above list and rename one element to "arabic".

Example:
Open includes/Core/locale.php
Rename 'arabic_syria' => 'ar-SY', to 'arabic' => 'ar-SY'
Do the same some lives above:
'arabic_syria' => array('ar_SY.UTF8@euro', 'ar_SY.UTF8', 'ar_SY.UTF-8'),
rename to
'arabic' => array('ar_SY.UTF8@euro', 'ar_SY.UTF8', 'ar_SY.UTF-8'),

Open .htaccess
Add arabic:
RewriteCond %{QUERY_STRING} !mylang=[armenian|arabic|bosnian|.....
Add rewrite rule:
RewriteRule ^(ar\-SY)/(.*)$ /index.php?mylang=arabic[QSA,L]

Instead of Arabic Syria you may use any Arabic language/locale you wish.
Notice that the last line (rewrite rule) might generates you error on apache because of the period "-". Experiment until you find the proper way of writing.
Also notice that you can safely delete all non-used languages in htaccess. This is recommended as apache process it faster.

So instead of this:
RewriteCond %{QUERY_STRING} !mylang [armenian|bosnian|creole|croatian|danish|english|french|german|greek|hebrew|indonesian|italian|
japanese|latvian|lithuanian|persian|polish|russian|serbian|spanish|srpski|turkish|vietnamese]{2,}

You can have this:
RewriteCond %{QUERY_STRING} !mylang [english|persian|arabic]{2,}
Title: Re: seo pro and problem for select language
Post by: active on March 02, 2009, 16:09:24
hi dear

thx for answer

but now i can't switch select language : www.akairan.com

arabic language is edit persian language .
thx
Title: Re: seo pro and problem for select language
Post by: datahell on March 02, 2009, 18:08:55
What have you done???? You have the same locale for persian and arabic. This is wrong.
Title: Re: seo pro and problem for select language
Post by: active on March 03, 2009, 13:05:08
where i can see the selection language in source , in database or other file ?
for example i select arabic-english-persian now where select in 3language ? where is path ?
Title: Re: seo pro and problem for select language
Post by: datahell on March 03, 2009, 14:41:04
Each Elxis front-end language is being place inside folder language/ in a sub-folder with the same name as the language.
Example: language/english/

Locale is being set in file: includes/Core/locale.php

Language rewrite (Elxis 2008.1+) is being set in .htaccess file.