MRatWork Forum by Mustafa Ramadhan
Language Specific Discussions => Translations => Topic started by: ynuyasha on 2013-06-21, 21:37:58
-
There is an italian translation for the panel or anyone starting to translate it?
-
You can translate for Italian and then share here.
Steps:
1. Copy /usr/local/lxlabs/kloxo/httpdocs/lang/en-us to /usr/local/lxlabs/kloxo/httpdocs/lang/it-it
2. Translate files inside /usr/local/lxlabs/kloxo/httpdocs/lang/it-it
3. Change 'Language' inside 'Appearance' on panel.
-
I have made a first version of Italian Translation but i have same problems with plurals.
I take a screenshot and signed with red circles same words that have an "s" appended.
I thik the problem is the function in langfunctionlib.php.
Any suggests to fix him
Regards
Antonio
-
This is the code of /usr/local/lxlabs/kloxo/httpdocs/lang/en-us/langfunctionlib.php:
<?php
function get_plural($word)
{
if ($word[strlen($word) - 1] === 's') {
$ret = "{$word}es";
} else if ($word[strlen($word) - 1] === 'y') {
if ($word[strlen($word) - 2] === 'e') {
$ret = "{$word}s";
} else {
$ret = substr($word, 0, strlen($word) - 1) . "ies";
}
} else if ($word[strlen($word) - 1] === 'x') {
$ret = substr($word, 0, strlen($word) - 1) . "xes";
} else {
$ret = "{$word}s";
}
return ucfirst($ret);
}
// This is an alternate get_plural, which has the all the plurals are defined in a file.
function get_plural_alternate($word)
{
include_once "lang/en-us/lang_plural.inc";
if (isset($__plural_desc[$word])) {
return $__plural_desc[$word];
}
return "{$word}s";
}
So, please explain Italian rule for plural word.
-
Italian rules are more complicated then English with many exceptions.
I made a function for this that include more cases (not all :D )
Before to give you the translation i have another question.
Some words seems doesn't appair in the lang files to translate:
I made a screenshot for this words:
-
Yes, certain word not write directly to code like 'unlimited'.
-
Ok thanks.
I finished first version of translation.
Where can i put the translation pack to share to all?
-
I will compile to rpm and add to kloxo-mr.repo server.
You can add as attachment in your post.
-
Here tar file of translation
-
Already added in latest upload (6.5.0.f-2013031825). After update, run 'yum install kloxomr-lang*'.