Proposition of translations about:

A recent picture is a last picture but a last picture is not a recent picture.
  A recent category is a last category but a last category is not a recent category.
So it's a proposition about last is not like recent.

Improvement of string including decimal number in order to concord singular and plural.
Now, function l10n_dec must be used.

git-svn-id: http://piwigo.org/svn/trunk@1637 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rub
2006-12-06 23:56:24 +00:00
parent f880be0609
commit fddfd816a7
6 changed files with 57 additions and 29 deletions
+15
View File
@@ -934,6 +934,21 @@ function l10n($key)
return isset($lang[$key]) ? $lang[$key] : $key;
}
/**
* returns the prinft value for strings including %d
* return is concorded with decimal value (singular, plural)
*
* @param singular string key
* @param plural string key
* @param decimal value
* @return string
*/
function l10n_dec($singular_fmt_key, $plural_fmt_key, $decimal)
{
return sprintf(l10n(($decimal > 1 ? $plural_fmt_key :
$singular_fmt_key)), $decimal);
}
/**
* Translate string in string ascii7bits
* It's possible to do that with iconv_substr