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!

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...