Power table header translation

I’m trying to have the power table headers translated based on the locale the user chose at logon.

Searching through the forum, Kathy Applebaum stated that, by design, the translation component isn’t the way to go (Table header translation)

I’m fine with that so I tried to script it and created a monster regarding what I felt like would be easy :slight_smile:

If I understand correctly, the header labels are in the Column Attributes Data dataset. I managed to change them but 2 issues popped :

  • The Column Attributes Data dataset is not populated when the frame is opening. And my first reflex is to put my code here : I just want it to run once. I managed to create the dataset from scratch and gave it to the table with no errors. good but…
  • Columns width are reset. Even though I found a way to collect the width, the viewDataset is also not populated at frame opening so the table.setColumnWidth() function does nothing. I tried creating the viewDataset before changing the width but I guess the “drawing” is done after my script so the setColumnWidth function is useless.

So in the end, just to translate headers, the script seems way too big to me and my columns widths are reset each time :frowning:
I found a way by putting my script in the data propertyChange of the table but it does not seems clean/efficient to me.

I can hardly believe I’m the first stumbling on that so I guess I took the wrong path from the beginning.
I found another post from Kathy stating that tables offer the dataset headers (Localization and Translatation Manager Scope in Components) but I can’t find anything in the properties of the component.

I also found this topic regarding binding to custom properties (Modification of Table headers). This is nicer, even though going through custom properties seems strange. But in the end, my columns width are reset so it’s not good either.

Is there a simple way to have power table headers translated ?

Thanks

Auto-replying to myself.

There is indeed a simple way : the translation manager.
It seems that what you write in the header row in the table customisation is considered as a key for the translation manager.
If the translation manager does not find your “key” in its database, it uses what you wrote.
So if you create a corresponding key in the translation manager, you’re in business.
Also works for the tabs in a navigation bar.