mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user