Y
Y
yeputons2012-08-19 22:44:45
Internationalization and localization
yeputons, 2012-08-19 22:44:45

Localization in WP7 - is there built-in support for plurals (similar to ngettext)?

I am learning programming for Windows Phone 7.1 using C#. On MSDN I came across an article on translation and localization of applications. It is recommended to push all used strings into resources and use Binding to StaticResource.

Question - I need to display a sentence with a number that depends on external factors (for example: "3 pages left"). Accordingly, different forms are required for different numbers. Moreover, if in English there are only two of them (==1, !=1), then in Russian, as everyone knows, there are more of them. Therefore, I want some analogue of the ngettext function, which allows you to work correctly with the plural in different languages. You can recommend third party libraries.

If not, what do you think is the best way to solve this problem? At least for two languages.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Miniwe, 2012-08-20
@jumbastic

Plural Forms - select the formula you need. Write a wrapper and that's it

E
eforce, 2012-08-20
@eforce

The last time I encountered a similar problem, I found this link: Clever way to append 's' for plural form in .Net (syntactic sugar) .

S
SychevIgor, 2012-08-19
@SychevIgor

I would google on the subject of decliners, because I doubt that there is a built-in one. Russia, of course, is the navel of the Earth, especially from the states.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question