Custom app name translations

Hello,

Hope you’re having a great day. I’m wondering how do I add translations to app platform app names so that the name changes in the DHIS2 app menu based on the users locale?

Many thanks in advance!
Pete

1 Like

Hi @plinnegan . Unfortunately, our custom apps don’t currently support the option to provide translations of the app name (and other relevant properties like shortName, description). The bundled core apps can have translated names because we store those translations in dhis2-core. (Though note we appear not actually to be using the translation in the header bar title in this case either)

We are aware of this shortcoming and have discussed the need to update our build processes to support translations (discussed on ticket LIBS-385), but the work was put on hold in favour of higher priority items.

Thanks for the question because it’s useful to get confirmation that this a feature people want :grinning:. I think we’ll probably revisit this issue in the next couple of months, but if this is something that is more immediately important to you, we could also look into shorter-term solutions. For example, we could wrap the name in the header bar title in a translation function (ui/components/header-bar/src/header-bar.js at d5e4db7112485021353e3f0423bca1c0531be5f8 · dhis2/ui · GitHub), so that you could define the translation string in the app’s translation files.

1 Like

Hey @tzemp !

Thanks for the speedy reply! :blush: The main concern is the name as it appears in the app menu, but we have a work around that we’ll just use the app acronym for now. So no need to implement that short term solution suggested, good to know it’s being thought about though.

2 Likes