I have an app plugin, and I would like to translate it similarly to how the other menu items are translated. Is there a way to do it, and are there any translation docs/guides?
My second question is tied to my previous one can I add different languages (for my personal use) to grafana and if yes, how?
I’m sorry if there’s a guide somewhere in the docs. I couldn’t find it.
But if you really feeling adventurous, you might as well take the bull by the horn, fork grafana and add internationalization feature using
or maybe not
Please note: We do not currently accept contributions for translations. Please do not submit pull requests for messages.po files - they will be rejected.
I’ve read that before, but I don’t really see how that helps me with either of my questions, maybe I’ve formulated it poorly. From looking at the source code, I see that the translation is done through .json files and some hard-coded in list of languages. I wanted to know if there’s a recommended way to add new languages for my personal/local use (not submitting them) and how to do it.
I’ve actually found most of what I was looking for in the contribute/internationalization.md.
I’m still stuck trying to figure out how to add the i18n translation to the app plugin since I can’t find where the processing of it is in the source code. I’m kinda lost in there so any pointers would be appreciated.
Hi,
thanks for the suggestion I managed to translate my plugin by forking the grafana repo and editing it, but I can’t really find much info on the getLocale() function and it keeps returning en-GB even with other languages selected. I need the info for my backend queries, do you have any idea why that might be happening?
Thanks for the tip. I think it was a bug in the 9.4.0 pre-release, I tried the same changes on the 9.3.6 release and it works as expected now.
I’m trying to figure out if there’s a way to get this info to my backend now. I used to have a language variable and I sent that as a payload but there isn’t a way (?) to get this into the payload, is there?