Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Bug reports and fixes
.
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
Language
(Moderator:
Farhad Sakhaei
) »
Creating new language?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Creating new language? (Read 18526 times)
Ivan Trebješanin
Elxis Team
Hero Member
Posts: 1663
Creating new language?
«
on:
May 08, 2007, 13:32:52 »
Hi,
My question goes to Elxis developers: Could I create new language?
Here's my problem: I have to create 4 online schools. As we Serbia have 2 scripts (NOT 2 languages), I need to find a solution to use serbian latin script. As, according to ISO, serbian official locale is serbian cyrillic, and students can be from regional countries, I need to display content in serbian latin. I was thinking of modifying croatian frontend laguage, as it is just a dialect of former serbo-croatian language, or creating a new language with new language tag (eg. sr_lat). I know that in Elxis languages are very sensitive matter, so I ask first.
Thanks
Logged
I've got a snap in my finger...
Got rhythm in my walk...
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Creating new language?
«
Reply #1 on:
May 08, 2007, 21:35:17 »
Yes you can.
There is only an issue that will be solved in Elxis 2007 regarding the naming.
What is the problem
You have "serbian" reserved for serbian cyrilic.
You need a new language name for serbian latin.
If the name for the serbian latin contains the word "serbian" (ie serbian_latin) you will have problem as database queries will return both items for serbian and serbian_latin for users that have "serbian" as their selected language (queries use the LIKE '%$lang%' method).
What you must do to solve the problem:
Rename "serbian" to "serbian_cyr".
Create a new language file package (as normally) named "serbian_lat".
Open includes/Core/locale.php
Find line:
'serbian' => array('sr_CS.utf8@euro', 'sr_CS.utf8', 'sr_CS'),
and add bellow this:
'serbian_cyr' => array('sr_CS.utf8'),
'serbian_lat' => array('sr_CS.utf8'),
Save the file. You are ready.
Notice 1:
sr_CS.utf8 will give you serbian cyrillic locale for "serbian_lat" too (ie dates will be in cyrilic).
I can not find a propper locale for "serbian_lat" (I think it does not exist).
So, you have 2 options:
1. display dates in english
'serbian_lat' => array('en_GB.utf8')
2. display dates in serbian cyrilic
'serbian_lat' => array('sr_CS.utf8')
Choose what you prefer most.
Notice 2:
If you find the proper utf-8 locale for "serbian_lat" and your system support it use that one.
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Ivan Trebješanin
Elxis Team
Hero Member
Posts: 1663
Re: Creating new language?
«
Reply #2 on:
May 08, 2007, 21:57:41 »
Thanx datahell,
It is more or less what I intended to do... nice hint about DB queries though, I din't foresee that. As for locale... I know that ISO is treating serbian cyr and serbian lat like two languages, and therefore there is no latin locale for serbia. So, nevermind the locale. I used to rewrite MOScurrentDate in situations like this one.
So, thank you again, and keep on the good work.
Logged
I've got a snap in my finger...
Got rhythm in my walk...
Ivan Trebješanin
Elxis Team
Hero Member
Posts: 1663
Re: Creating new language?
«
Reply #3 on:
May 09, 2007, 17:29:24 »
Hi datahell,
I have created new language called srpski, and so far, it seems to be working. I didn't add naw array in includes/Core/locale.php, though, because I want to share latin version with all users of Elxis, and it wouldn't be convenient to tell them all to mod includes/Core/locale.php. Anyway, serbian latin locale (UTF-8) doesn't exist, so I think there should be no problems. If you think that this solution might be worth posting in translations page, I will send it to develop at elxis dot org.
I did, however, notice this line > DEFINE('_LANGUAGE','sr'); I wonder if I should change this abbreviation too?
Thanks for your help
Logged
I've got a snap in my finger...
Got rhythm in my walk...
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
Language
(Moderator:
Farhad Sakhaei
) »
Creating new language?