見出し画像

Pluralization Support in REALITY App

REALITY is an avatar streaming platform available in 63 regions worldwide. About 80% of our users are from outside Japan. We take our app's localization seriously to provide a natural user experience worldwide. Currently, the REALITY app supports 12 languages: English, Traditional Chinese, French, German, Indonesian, Japanese, Korean, Malay, Brazilian Portuguese, Russian, Spanish, and Thai.

Since our app targets a global audience, localization is a crucial component. This article will briefly walk you through how we manage the translation and introduce a recent development project that supports pluralization.

Translation Management at REALITY

We have been using Lokalise, a localization management platform, since the middle of 2022. Using this service, we can manage translation keys and resources across all our platform source codes in one place. Lokalise allows us to add new translations quickly, detect inconsistencies, and fix errors without involving any engineering resources.

You can change the language from settings menu :)

Pluralization Support

Still, there was one aspect of localization we hadn't addressed until now - Pluralization. As our company is based in Japan, this concept was initially unfamiliar to our team. However, as we aimed to reach more global audiences, it became increasingly important.

Take the phrase “Pull a Gacha 1 time” for example. Previously, the phrase would spell “Pull a Gacha 1 time(s)” and “Pull a Gacha 10 time(s)”. There was no differentiation between singular and plural forms.

However, with the recent release of our app, we can now differentiate between singular and plural cases. So the phrase now spells "Pull a Gacha 1 time" and "Pull a Gacha 10 times"

This adjustment improves grammar usage. You can see a real-world example on our Gacha page, where the word “pull” changes form depending on the number of pulls.

1 more pull & 11 more pulls!

Did I mention we support 12 languages? Other languages with the concept of pluralization are supported as well!

German language pluralization support

Under the Hood

To support multiple languages' plural forms, we have done many efforts to our client application code. If you take a look at Language Plural Rules defined by the Unicode organization, you will see that it is far more complex than just differentiating between "one" and "not one" cases.

The Lokalise system supports plural forms out of the box, so managing translation keys wasn't an issue. However, different platforms handle plural forms in different ways.

For iOS, Apple offers built-in support and guidelines for string pluralization. For Android, the Quantity Strings feature allows us to get plural strings with a simple function call.

Unity app works differently. While there is a Smart Strings format for pluralization, Lokalise cannot export resources in this format. As a solution, we created a native plug-in that calls an iOS/Android function to determine the plural type.

Final Thoughts

In this article, I briefly explained how REALITY manages translation resources and the recent pluralization support implemented in the app. I acknowledge that our localization process isn’t perfect, but we’re continuously working to improve its quality.

If you have any suggestions for localization and translation, please join our Discord community and report it in the #localization channel!


Written by Chuy, iOS engineer of Platform & Avatar Division, REALITY, Inc.