Android plurals #10655
-
Hi, I have an (open source) translation project that uses Android string resources. I have two files: strings.xml (normal strings) and plurals.xml (plurals only). This is the structure required by the library (Moko Resources) which we use to make the resources available on desktop and the web. In the docs on the Android format ( https://docs.weblate.org/en/latest/formats/android.html ) I don't see any mention of plurals on Android. When I download the files from the component ( https://hosted.weblate.org/projects/ustad-mobile/plurals/ ) the plurals.xml file is there and includes all languages. It still doesn't recognize this the plurals as translatable (e.g. nothing for users to translate and word count is shown as zero). Are plurals on Android supposed to be supported? As per the documentation ( https://docs.weblate.org/en/latest/user/translating.html#plurals ) it seems to suggest that the plural rules should be loaded as per the language code. Edit: The docs on pluralized strings ( https://docs.weblate.org/en/latest/formats.html#pluralized-strings ) seems to indicate that plurals for Android should be supported. Thanks, -Mike |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Yes, plurals are supported, you just need to create an additional component for each file that is being translated. |
Beta Was this translation helpful? Give feedback.
-
@nijel thank you for the reply. I thought that was what I did. I think I have found the problem: Moko resources uses "plural", not "plurals" like the normal Android xml. |
Beta Was this translation helpful? Give feedback.
Yes, plurals are supported, you just need to create an additional component for each file that is being translated.