Using i18n translations on Grafana panel labels embedded as iframe

Hi, I’m embedding Grafana panels as iframe in my react application.

Is there a way to pass translations to these panels’ labels?

The translations do not have to be strictly passed from the application, if it can be set as a configuration inside Grafana then that would also be helpful.

Any pointers would be appreciated, thanks!

Welcome

Not sure if thread helps

Thank you for the reply.

From what I get that thread discusses more about Grafana’s UI translation, what I want to achieve is to provide some kind of mapping to a panel’s labels.

For example, I have this panel:

And I want to have a dropdown variable containing multiple language choices (e.g. EN, FR, DE) which when selected, will replace the Title in EN, Metrics1 in EN, Metrics2 in EN with the chosen language.

Would this kind of mapping be possible in Grafana?

Ah gotcha. Where is your data coming from? You could do all this in a database or a rest api you feed grafana

You send in languageGuid and it returns those values for the chosen language?

The data is coming from an elasticsearch datasource. Does that mean the translations need to be mapped in there?

Is there a way to map the translations in Grafana, i.e. using JSON data format, without modifying the datasource / adding a new one?

You could but that is not a sustainable approach as data is dynamic?

Do you mind giving pointers on how to do each approach? (the database and the grafana mapped one)

The reason I’m thinking of the latter approach is because I would like to minimize the changes on our database structure. It feels easier to do too since we can control the labels mapping on the grafana dashboard, but I might be wrong.