Kodi Community Forum

Full Version: Better Way to Handle Localization?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to split up large language files?
I have a large addon, and it'd be nice to have settings.po, connection_wizard.po, notifications.po, errors.po, etc. This reminds me of the nightmare of resx resource files that are 2000 entries and a nightmare to edit, manage, and correlate to the relevant code. It could work something like getLocalizedString('connection_wizard', 32015) or something. Personally, the concept of binding resource strings to an integer is a pain to begin with. Fast, but a pain. I would really prefer to do something like getLocalizedString('connection_wizard.ip_address') orĀ getLocalizedString('error.connection_failed_header'). My real question is, "Is there a way to more easily handle hundreds of localized strings than a single strings.po file referenced by ambiguous integer IDs that may conflict with other parts of Kodi other addons?"
Short answer, no
Fun. I don't want to wrap my own, but it's becoming more trouble than it's worth for my case to use Kodi's built in localization.

Sure, I'm fine with hard coding strings, but I'm not the only dev....