Support #691

support of Wt::WDateTime::timeTo() with russian

Added by Boris Nagaev almost 12 years ago. Updated over 11 years ago.

Pieter Libin
Target version:
Start date:
Due date:
% Done:


Estimated time:


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 almost 12 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 )



Updated by Boris Nagaev almost 12 years ago

Maybe library should use this or same tool and automatically provide properly plural form depending on using language

For example, xml-file:

    <message id='posts'>
        <plural case='s'>There is 1 post</plural>
        <plural case='p'>There are {1} posts</plural>

    <message id='posts'>
        <plural case='s1'>1 запись</plural>
        <plural case='m2'>{1} записи</plural>
        <plural case='m5'>{1} записей</plural>

Maybe plural forms should be excluded from c code of library users and accumulated in xml-files


Updated by Koen Deforche almost 12 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 ?




Updated by Boris Nagaev almost 12 years ago

Hello Koen,

WString::trn(const char *, int n) would be useful



Updated by Koen Deforche almost 12 years ago

  • Status changed from New to InProgress
  • Assignee set to Pieter Libin

Updated by Pieter Libin almost 12 years ago

  • Status changed from InProgress to Resolved

Updated by Koen Deforche over 11 years ago

  • Status changed from Resolved to Closed

Available in Wt 3.1.9

Also available in: Atom PDF