How to handle special cases in localization swift

后端 未结 3 371
一个人的身影
一个人的身影 2021-01-16 09:14

I created a Localizable.strings file and the translation works fine. But there is a special case where in english there is one word for singular and plural, like \'series\'.

3条回答
  •  一向
    一向 (楼主)
    2021-01-16 09:46

    How I do it is do my localisation names as follows: series = "series" and "Serie" and series_pural = "series" and "Serien". Then the system just looks for a _plural afterwards and if it exists then it'll show it (if you tell it that its a plural word that u are localising). Another way would just you handle whether or not a word is a plural on a case by case basis.

提交回复
热议问题