i18n / l10n implementation

Hello, Backendless Team and fellow builders,

I’m looking at creating a mobile platform and evaluating Backendless and was curious what you think a good approach would be at applying internationalization / localization (i18n / l10n) practices to the data model. Some of the entities I’m modelling should definitely be able to store information that is context-aware and I’m a little bit confused about how to do that. My initial thought was to just add multiple _{locale} columns to the data model and make sure they get populated from a row “master set” onCreate, but I guess we could also have them defined as separate collection data and linked 1:n to. I haven’t been able to find anything close to “best practices”, only this topic about localizing e-mail templates, so I figured I’d try to pick your collective brains :slight_smile:

Cheers,
Elis.

Hi Elis,

Is there a particular reason why you’d want to keep the translations in the database rather than the locale files?

Regards,
Mark

Hey, Mark,

Yes, there is a reason and that is the user-generation context. An example would be a CoffeeShop entity where I would want the “owner” of the coffeeshop to be able to provide multiple internationalized and localized versions of the same description - maybe he wants to focus on targeting specific locales with how their little shop offers the best quality 5% fat milk that Brits want in their Earl Grey and/or prices in GBP, or something similar in concept. The idea is I would like the data to drive this process and not keep global, platform-wide text translations for each possible object-related, user-generated and user-driven content. I also want this content to be readily accessible and modifiable by users with the proper context permissions, which would (IMHO) make saving stuff in XML files a workaround, instead of using the data storage as it’s meant to be used.

I hope this answers the question and I look forward to your thoughts.

Cheers,
Elis.

Hi Elis,

Thank you for clarifying. From that perspective it does make sense to keep the entities in the tables. However, from the performance perspective you might consider creating a Timer (using custom business logic) and generating locale files based on the content in your tables.

As for the data model, I would keep each translation set in a separate table with 1:N links from the master set.

Hope this helps.

Regards,
Mark