Hi all, looking for prior art on a localization pr...
# multiplatform
j
Hi all, looking for prior art on a localization problem in a KMP white-label app with native UIs. We currently use Weblate in combination with moko-resources for our localizations but we have an upcoming requirement where we need to allow brand specific overrides possible in each language. So a translation will not be resolved via
language × key
but with
language × brand × key
if an override exists. Two constraints that make it even more tricky: 1. The brand will be switchable at runtime at some point in the future (Same brand in different countries will still be considered as different brand. Needed for people living at country borders). So build flavors or targets will not really be a solution. But we still have the information for the initial brand in the build config for both operating systems 2. We rely heavily on previews and screenshot tests, so text has to resolve synchronously without app init. They can work fine with the base localizations and no not necessarily consider overrides. Although if this would be configurable, it would be nice. We additionally use plurals in moko-resources and Weblate, so this should still be possible. I would be fine with replacing moko-resources with another or custom solution if its not capable of our use case, but Weblate will stay as a tool. Has anyone solved this shape of problem? Specifically curious whether moko can carry a second dimension, or whether people end up generating code instead. 🙏