2022-04-20 03:22 PM
Hi, I am using TouchGFX 4.16.1. Could you suggest a tutorial or some other material to add a second language to my project. Thank you.
Solved! Go to Solution.
2022-04-22 02:11 AM
Hi BGuth.1,
I opened your project, and the problem I see is that you haven't created a new font supporting your language in your TouchGFX Designer.
Here are the steps to make it work :
1- Click on "Texts" panel at the top and "Typographies". You will have a list of all Typographies you can use at the moment. To add a new one, click on Add new Typography"
2- Edit the new typography (enter a name, select your kruti-dev typo, and change the size). Then Click on "Save"
3- Go to "Ressources" and for your ResourceId1, edit your translation by clinking on the "T" button when you pass your mousse on the text zone. Then select the new Typo you've just created in step 2.
3- Run the project on your simulator
But now, the problem we see is that the text you added doesn't match with the text shown on the simulator. That's why I highly recommend you to try other fonts to see which one can be compatible. I tried with an other font I fount here : (https://fonts.google.com/noto/specimen/Noto+Serif+Devanagari?subset=devanagari&query=Devanagari) and it looks to be running fine.
Let me know if it works fine on your side 🙂
/Osman
2022-04-21 04:01 AM
Hi BGuth.1,
We don't have a tutorial, but we have this documentation for TouchGFX Designer version 4.16.1 that can help you.
Here the steps to add a second language with TouchGFX Designer:
1 - Click on "Texts" panel at the top and "Add New Language"
2- A popop will appear, you'll need to add the language you want to add. Then click on "Save"
3- In "Resources", create a new resource by clicking on "Add new resource" and fill the info about the the resource.
4- Go back to "Canvas" and add a new text widget.
5 - On the right panel, click on "Resource" under the "Text" section, and select your new ressource.
6- Now go to "Config", and under General, change the "Selected Language". The change will automatically take place on you canvas
7- Enjoy 🙂
/Osman
2022-04-21 06:52 AM
Hi @Osman SOYKURT ,
Thank you for your detailed reply and taking time to explain with images. I appreciate it.
I am looking to add a language that has completely different script than English (e.g. Devanagari). How can I do that?
Also, similar to Windows operating systems, I want to be able to select the language through a settings option and then change the langue of text in all screens as per the selection made. Please advice.
2022-04-21 01:12 PM
Hi @Osman SOYKURT
I downloaded Devanagari font (kruti-dev-021.ttf) and tried implementing a simple example. I put the font in ...\TouchGFX\assets\fonts folder and followed the example you provided in adding the language. However, TouchGFX doesn't recognize the characters from the Davanagari script and showing the fallback character when I click on Hindi button.
I am attaching the project here for your reference. Please advice.
2022-04-22 02:11 AM
Hi BGuth.1,
I opened your project, and the problem I see is that you haven't created a new font supporting your language in your TouchGFX Designer.
Here are the steps to make it work :
1- Click on "Texts" panel at the top and "Typographies". You will have a list of all Typographies you can use at the moment. To add a new one, click on Add new Typography"
2- Edit the new typography (enter a name, select your kruti-dev typo, and change the size). Then Click on "Save"
3- Go to "Ressources" and for your ResourceId1, edit your translation by clinking on the "T" button when you pass your mousse on the text zone. Then select the new Typo you've just created in step 2.
3- Run the project on your simulator
But now, the problem we see is that the text you added doesn't match with the text shown on the simulator. That's why I highly recommend you to try other fonts to see which one can be compatible. I tried with an other font I fount here : (https://fonts.google.com/noto/specimen/Noto+Serif+Devanagari?subset=devanagari&query=Devanagari) and it looks to be running fine.
Let me know if it works fine on your side 🙂
/Osman
2022-04-24 12:29 PM
Thank you very much. I see the new language text now.