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.

0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...