Dashboards & Visualizations

How to resolve a token in a i18n-Token?

stephanfuchs
Engager

Hello,

I have a specific question concerning translations with i18n.

So what I want to do is translate an i18n-token  in a HTML-environenment which contains "normal" Splunk token and resolve them. For example the i18n token "i18n_coil_machine2_vor_x_tagen2":

"$tok_coil_machine_2$ vor $tok_latest_stack_time_2$ Tagen". When I insert the token in a dashboard title it works and it resolves the inner token. But when I use it in a HTML it does not:

Results in title: "XXX vor YYY Tagen"

Results in HTML: $tok_coil_machine_2$ vor $tok_latest_stack_time_2$ Tagen

Here is a minimal working example :

<dashboard script="translation.js">
<init>
<set token="tok_coil_machine_2">XXX</set>
<set token="tok_latest_stack_time_2">YYY</set>
</init>
<label>TEST</label>
<row>
<panel>
<title>i18n_coil_machine2_vor_x_tagen2</title>
<html>Only Token: $tok_coil_machine_2$ und $tok_latest_stack_time_2$</html>
<html> IN HTML: <span i18ntag="">i18n_coil_machine2_vor_x_tagen2</span></html>
</panel>
</row>
</dashboard>

Is there a solution for this? I would be very thankful for any help.

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...