Support #691
closedsupport of Wt::WDateTime::timeTo() with russian
0%
Description
The timeTo() method contains the following localized strings:
* Wt.WDateTime.second: one second
* Wt.WDateTime.seconds: {1} seconds The placeholder {1} will
be replaced by the actual number of seconds. The same keys also
exist for minutes, hours, days, weeks, monts and years.
There are 3 cases in russian:
- for 1, 21, 101 (1 секунда - 1 second)
- for 2-4, 22-24, 102-104 (22 секунды - 22 seconds)
- for 5-20, 25-30 (10 секунд - 10 seconds)
Is there any way to use timeTo() with russian?
Updated by Momo LALMI over 13 years ago
Hello Starius,
You are perhaps working on internationalization of your application.
May be we can help each other by adding an additional language to our applications ( I am fluent in french and you are fluent in Russian )
Regards
Updated by Boris Nagaev over 13 years ago
http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms
Maybe library should use this or same tool and automatically provide properly plural form depending on using language
For example, xml-file:
English:
<message id='posts'>
<plural case='s'>There is 1 post</plural>
<plural case='p'>There are {1} posts</plural>
<message>
Russian:
<message id='posts'>
<plural case='s1'>1 запись</plural>
<plural case='m2'>{1} записи</plural>
<plural case='m5'>{1} записей</plural>
<message>
Maybe plural forms should be excluded from c code of library users and accumulated in xml-files
Updated by Koen Deforche about 13 years ago
Hey Starius,
The gettext way of dealing with this is interesting, and your syntax could work.
I guess we could foresee that WString::trn(const char *, int n)
is used instead of WString::tr(const char *)
to consider tags ?
Regards,
koen
Updated by Boris Nagaev about 13 years ago
Hello Koen,
WString::trn(const char *, int n)
would be useful
Regards
Updated by Koen Deforche about 13 years ago
- Status changed from New to InProgress
- Assignee set to Pieter Libin
Updated by Pieter Libin about 13 years ago
- Status changed from InProgress to Resolved
Updated by Koen Deforche about 13 years ago
- Status changed from Resolved to Closed
Available in Wt 3.1.9