cancel
Showing results for 
Search instead for 
Did you mean: 

Translation sheet on 4.22.1 TouchGFX version

GMene.785
Associate II

 

Hello,

In previous versions of touchGFX, I could easily translate texts by editing an .xlsx file and then replacing it in the assets folder.

However, I've noticed that in version 4.22.1, there is only an .xml file generated when I create touchGFX files. I tried editing it and replacing it, but I'm encountering an 'Error on the .xml file' when I open touchGFX. Is there a way to edit translations outside of touchGFX?

I've also noticed that I can't filter texts by view anymore, and I need to group them manually, which is quite challenging for a migrated project. Is there a feature that I can use to identify where text is in the GUI?

Thanks for your assistance.

2 REPLIES 2

Hello @GMene.785 ,

You can edit the generated .xml file but replacing it completely might causes some issue. What I suggest is to add the language from the designer and keep the text empty, then add the values you need into the .xml file. It would be like this:
EmptyText.jpg

 

    <TextGroup Id="Unsorted">
      <Text Id="ResourceId1" Alignment="Left" TypographyId="Default">
        <Translation Language="GB">Hello</Translation>
        <Translation Language="DK">Hej</Translation>
      </Text>
      <Text Id="__SingleUse_CJ9S" Alignment="Left" TypographyId="Default">
        <Translation Language="GB">Welcome</Translation>
        <Translation Language="DK">Velkommen</Translation>
      </Text>
    </TextGroup>

which results in:
addtext.jpg

 

But for your second question, unfortunately, there are no ways currently to find the usage of each text. However, we will surely consider this problem for future. 

I hope I have answered your questions, and don't hesitate to ask more

Mohammad MORADI
ST Software Developer | TouchGFX
ferro
Senior II

Hi,

"I've noticed that in version 4.22.1, there is only an .xml file generated"
Maybe option could be to go to .xlsx domain, edit there and go back to .xml.

Few links related to the topic:

Texts and Fonts
https://support.touchgfx.com/docs/development/ui-development/touchgfx-engine-features/texts-and-fonts


Issue with importing translations into TouchGFX!!!
https://community.st.com/t5/stm32-mcus-touch-gfx-and-gui/issue-with-importing-translations-into-touchgfx/m-p/125203#M6198


Text transtlation. How to run translation.rb script.
https://community.st.com/t5/stm32-mcus-touch-gfx-and-gui/text-transtlation-how-to-run-translation-rb-script/m-p/120692#M5788