[FEATURE-13837] Translations

#1

Dear all,
I am currently using the b2019040718 release.
what about the translation feature in Perspective? Are there news about this topic?
The translation feature is a key point to widely deploy our applications.

Thank you in advance for your reply.
Andrea

0 Likes

Will Ignition 8 or Perspective have any ability to translate the contents of tables?
#2

Right now there is fundamental support for translations in Perspective, but they aren’t quite useful yet (currently only supported by Buttons and Labels). I’ve added a ticket to prioritize the rollout across all components. I can’t provide a timeline at the moment, but will update when I can.

0 Likes

#3

Good morning,
thank you for your reply. Could you clarify me how to set up the translations for Buttons and Labels?

Thanks.
Andrea

0 Likes

#4

Hi Andrea,

There is really very little to setup. Basically if you have terms defined for a locale, and the session is set to that locale (session.props.locale), then a term matching property value will get swapped with the localized term.

For instance:
I display the term “food” in en_us.
I add a localization for es that maps “food” to “comida”, using the translation manager.

Now, on any label being presented, if the default locale (en_us) text value is “food” and the session.props.locale is set to es, then the value displayed will be “comida”.

The underlying property value does not change, we simply present the localized version to the user instead of the default en_us version.

0 Likes

#5

Thank you for your reply.
Just a few more questions:

  1. Are the “system.util.*” functions related to translations (like “system.util.modifyTranslation” ) limited to the vision scope or available also in perspective?
  2. Does the “session.props.locale” value correspond to the Java locale codes?

Thank you.
Andrea

0 Likes

#6

As many of the system.util functions as can be are in the process of being ported over to work in all scopes - possibly 8.0.2, maybe 8.0.3 for those that can be.
session.props.locale is the IETF language tag equivalent of the Java locale: https://en.wikipedia.org/wiki/IETF_language_tag - see https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Locale.html#toLanguageTag() for how we map them from Java to JS to send them to the frontend.

0 Likes

#7

This feature was added in the 8.0.2 nightly build that was uploaded today (5/21).

0 Likes

split this topic #8

2 posts were split to a new topic: [feature-14961]Add system.util.modifyTranslation to GW/Perspective

0 Likes