# \[IGN-2389\] Perspective translation of table headers

**URL:** <https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 21, 2020, 8:23pm UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704 "2020-12-21T20:23:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShaneH](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@ShaneH](https://forum.inductiveautomation.com/u/ShaneH)\
**Post date:** [December 21, 2020, 8:23pm UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/1 "2020-12-21T20:23:43Z")

</div>

Using Perspective 8.1.

I've got a table defined, where each column has a header.title defined.  
This title is a static, simple string; not set via a binding or programmatic method.

I added the header titles to the Translation Manager, with appropriate translations for my desired languages. However, when I change the locale, the header titles do not reflect the change.

I'm pretty sure I have things configured correctly as other text labels on the same page are updated to reflect the change in locale.

Are table column header titles not included in the automagic translation processing?

Thanks.  
-Shane

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [December 22, 2020, 7:35am UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/2 "2020-12-22T07:35:46Z")

</div>

They don’t appear to be. I’ll check with Dev to see if there’s a reason. As a workaround, you could always bind the header values to an expression function:

```auto
translate("MyWord")

```

This results in the header value being properly translated according to the locale of the session.

---

<div class="post-metadata">

**Author:** ![ShaneH](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@ShaneH](https://forum.inductiveautomation.com/u/ShaneH)\
**Post date:** [December 22, 2020, 2:18pm UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/3 "2020-12-22T14:18:19Z")

</div>

Thanks for the update.

Same issue with Tab Container headers. Can you confirm it doesn’t work for them as well?

I can work around it as you say (binding and calling translate), I just want to make sure I’m not missing something such that it’s taken care of “automagically” like the other translation processing for labels, etc.

Thanks.  
-Shane

---

<div class="post-metadata">

**Author:** ![kyle.demerath](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@kyle.demerath](https://forum.inductiveautomation.com/u/kyle.demerath)\
**Post date:** [December 16, 2021, 4:12pm UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/4 "2021-12-16T16:12:35Z")

</div>

Same question - is there a timeline to include table headers and tab containers in the normal translation process?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 16, 2021, 4:22pm UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/5 "2021-12-16T16:22:48Z")

</div>

In most of Ignition, automatic translation is applied to constant strings that IA provides as part of the platform. Apparently except for label text in Perspective. User supplied text generally requires user invocation of translation. Why do you think the table headers _ **you** _ supply should be treated specially? When it would likely interfere with anyone who is following the current model?

---

<div class="post-metadata">

**Author:** ![ShaneH](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@ShaneH](https://forum.inductiveautomation.com/u/ShaneH)\
**Post date:** [December 16, 2021, 5:42pm UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/6 "2021-12-16T17:42:50Z")

</div>

I’m not sure what you mean…

Currently, in Perspective, if I throw a button component down, I have to supply a label, which Ignition will automagically translate for me (assuming I’ve configured the text in the translation manager correctly). This translation bit is true for _most_ perspective components.

I would expect if I throw a tab container down, where I have to supply a label for the tabs, Ignition to automagically translate it for me as well. (I actually think this might have been fixed in a recent Perspective version.)

I know tables and graphs are a little trickier, as they are essentially handled by a third party component – but still, when configuring tables and graphs, I have to supply labels for column headers, etc.

I would just like the _expectation_ documented somewhere if they are only going to translate _label_ text for some components and not others.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 16, 2021, 5:48pm UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/7 "2021-12-16T17:48:36Z")

</div>

Hmm. I’m going to have to play with this some more. (Still mostly in Vision, which doesn’t auto-translate much of anything.)

---

<div class="post-metadata">

**Author:** ![kyle.demerath](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@kyle.demerath](https://forum.inductiveautomation.com/u/kyle.demerath)\
**Post date:** [December 16, 2021, 10:10pm UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/8 "2021-12-16T22:10:58Z")

</div>

I agree with @ShaneH that it would be nice for more items to be cross referenced to the translation manager. A couple other examples of items that don’t translate automatically would be the legend on Time Series charts and the titles (including axes) and legend on XY charts.

For what it’s worth the PowerChart is better in that if you have a word used in the Power Chart in your translation manager it will get translated (except in the table headers), but you have to add them it seems.

---

<div class="post-metadata">

**Author:** ![carrie.zheng](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@carrie.zheng](https://forum.inductiveautomation.com/u/carrie.zheng)\
**Post date:** [December 27, 2021, 9:52am UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/9 "2021-12-27T09:52:00Z")

</div>

We tried to bind header.title, but the translation display is one after one.  
Do you have any suggestions for us to improve the translation speed?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [December 27, 2021, 4:10pm UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/10 "2021-12-27T16:10:08Z")

</div>

The reason you’re seeing them pop in asynchronously is that the bindings each resolve independently. You could set up a single script to resolve al of the headers at once, but it requires some extra setup (even the following example could probably be optimized).

You could create a custom property which is an array: `Table.custom.headers`, which contains all of the un-translated header names.

```auto
[
    "one",
    "two",
    "three"
]

```

Create a second custom property: `Table.custom.translated_headers`. Bind this to `this.custom.headers`, and include a transform:

```auto
return [system.util.translate(header) for header in value]

```

Result:

```auto
[
    "uno",
    "dos",
    "tres"
]

```

As the final piece, right-click `Table.custom.translated_headers`, and select the onChange Script option. You’ll want to provide an onChange script:

```auto
if currentValue:
    # this expects that you have already defined/created a column for every header you're expecting to use
    [self.props.columns[index].header.title = title for index, title in enumerate(currentValue.value)]

```

---

<div class="post-metadata">

**Author:** ![carrie.zheng](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@carrie.zheng](https://forum.inductiveautomation.com/u/carrie.zheng)\
**Post date:** [December 28, 2021, 2:42am UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/11 "2021-12-28T02:42:00Z")

</div>

Thank you very much for your quick reply. We will try it!  
In addition, I would like to ask whether the time schedule allows the Table Header to directly transfer the language terms without binding?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [December 28, 2021, 2:54am UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/12 "2021-12-28T02:54:52Z")

</div>

If you’re asking about the Equipment Schedule component, and the months of the header or even the range dropdown, then yes - those pieces are translated somewhat automatically; months are automatic, but the range dropdown requires the ranges be supplied in the Translation Manager. This is because months are common and part of the “library” by default, whereas ranges are not. This sort of boils down to “December” only needing one translation, whereas “hour” and “hours” each need their own translation.

If you’re asking about a different part of that component, or a different component altogether, then you’ll need to be more specific and/or include a screenshot.

---

<div class="post-metadata">

**Author:** ![carrie.zheng](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@carrie.zheng](https://forum.inductiveautomation.com/u/carrie.zheng)\
**Post date:** [December 28, 2021, 3:43am UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/13 "2021-12-28T03:43:22Z")

</div>

Sorry, I mean, is there a schedule to enable Table Header to be able to transfer language without binding just like Label Component do?

---

<div class="post-metadata">

**Author:** ![carrie.zheng](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@carrie.zheng](https://forum.inductiveautomation.com/u/carrie.zheng)\
**Post date:** [December 29, 2021, 4:51pm UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/14 "2021-12-29T16:51:11Z")

</div>

After trying, the following error message appears, what might be wrong?  
org.python.core.PySyntaxError  
SyntaxError: (“no viable alternative at input ‘=’”, (‘function:valueChanged’, 4, 45, ‘\t [self.props.columns[index].header.title = title for index, title in enumerate(currentValue.value)]\n’))

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [December 29, 2021, 5:13pm UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/15 "2021-12-29T17:13:42Z")

</div>

Ah, maybe you can’t do assignments with that syntax…  
Try this:

```auto
if currentValue:
    for i in range(len(currentValue.value)):
        self.props.columns[i].header.title = currentValue.value[i]

```

---

<div class="post-metadata">

**Author:** ![carrie.zheng](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@carrie.zheng](https://forum.inductiveautomation.com/u/carrie.zheng)\
**Post date:** [December 30, 2021, 2:46pm UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/16 "2021-12-30T14:46:25Z")

</div>

Thank you very much!

---

<div class="post-metadata">

**Author:** ![riccardo.giampaolo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/riccardo.giampaolo/32/20852_2.png) [@riccardo.giampaolo](https://forum.inductiveautomation.com/u/riccardo.giampaolo)\
**Post date:** [November 9, 2023, 2:53pm UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/17 "2023-11-09T14:53:48Z")

</div>

@cmallonee hello, sorry for resurfacing this issue but it seems to be still ongoing on 8.1.33

The expression workaround is still valid, I'm just wondering if there is ongoing work on this and table headers will be localized as other components, or if the workaround is here to stay 🙂

Thank you!

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [November 9, 2023, 3:10pm UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/18 "2023-11-09T15:10:10Z")

</div>

Work has not started on utilizing the translation API for the Table component. It's definitely something we plan on fixing, but it's also a lower priority.

---

<div class="post-metadata">

**Author:** ![riccardo.giampaolo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/riccardo.giampaolo/32/20852_2.png) [@riccardo.giampaolo](https://forum.inductiveautomation.com/u/riccardo.giampaolo)\
**Post date:** [November 10, 2023, 9:52am UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/19 "2023-11-10T09:52:18Z")

</div>

Thanks for the update, I will use the expression workaround and keep an eye on the changelogs then 🙂

---

<div class="post-metadata">

**Author:** ![stat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/stat/32/32530_2.png) [@stat](https://forum.inductiveautomation.com/u/stat)\
**Post date:** [November 1, 2024, 7:43pm UTC](https://forum.inductiveautomation.com/t/ign-2389-perspective-translation-of-table-headers/41704/20 "2024-11-01T19:43:10Z")

</div>

This has been resolved in the [8.1.45 nightly](https://forum.inductiveautomation.com/t/nightly-8-1-changelogs-2024/83608/158). You can now provide translations for the Perspective table's headers/footers and groups as long as there is a configured column or group property in the table's properties without using system.util.translate or the translate expression function.
