Multilingual Support

Overview

Offering a product interface in the end-user’s preferred language makes it user friendly and enhances their understanding of the functionality. For a wider reach, supporting multiple languages for a product will be required.

Flint facilitates multi-language features through 16-bit Unicode, allowing users to work with a broader range of characters and symbols beyond the standard ASCII character set. With its multi-language support, it allows users to select their preferred language for a more comfortable experience.

Unicode Support

To enable Unicode character support in Flint, create a font file, opt for an appropriate Unicode font and choose the Character Set as a Unicode file. We’ve opted for the “Gen Jyuu Gothic Monospace” font to accommodate Japanese characters.

Now add the required Japanese characters to a text file under custom_chars (resources → fonts → custom_chars) and map this text file to font → Custom Chars as shown below for the Japanese fonts:

Japanese character text file

Japanese character text file


Mapping text file to Custom chars

Mapping text file to Custom chars

Now upon previewing the font, the Japanese characters are available.

Unicode Font File for Japanese characters

Unicode Font File for Japanese characters

Now create a Data variable, select the Storage type as “Unicode Encoded” and set the maximum length of the character. Next, go to the Data Bridge tab, click on ‘Add’, provide the name and ID, select conversion as “To String”, then map the UE data variable to Data 0 and click OK and Save.

Data variable with Unicode Encoded type

Data variable with Unicode Encoded type

Now map the data bridge to the labels widget. When the label text is input with Japanese characters the same can be seen in the design area.

Data variable with Unicode Encoded type

Data variable with Unicode Encoded type

Now export the project. In the simulation, to write a dynamic character in the label widget, select the data id and give value in the format of “ue:” followed by the character Unicode values. For example, below hexadecimals are the 16bit Unicode representation of the Japanese text. “ue:3053,3093,306b,3061,306f” which represent the Unicode “こ - 3053, ん - 3093, に - 306b, ち- 3061, は- 306f” respectively.

Japanese characters in Simulation

Japanese characters in Simulation

Thus, by selecting the Unicode Encoded type, users can input, manipulate, and display text data containing characters from various languages, special symbols and ensuring compatibility with diverse linguistic and typographic requirements.

Diacritic Support

Many languages share a basic character set with English but require only a few additional diacritics to represent unique sounds or characters.

In Flint, users can add these diacritics as custom characters within English fonts. Instead of relying solely on Unicode type fonts, custom characters are added to the font to ensure proper representation of these languages.

Diacritical Characters

Diacritical Characters

In this approach, the regular string type can be used instead of going for Unicode encoded strings.

Multi-lingual Grouped Font

Sometimes, it is essential to support different languages at the same location based on user preference. This can be achieved with the grouped font concept discussed earlier on Fonts in Flint section.

Now, let’s explore the steps to support three languages: Hindi, Tamil, and Kannada simultaneously. Begin by generating a font file within the “resources -> fonts”.

Once the font file is created, select a suitable Unicode font and choose the Character Set as Unicode file. Now add the required characters to a text file under custom chars (resources -> fonts -> custom chars) as shown below:

Custom Chars – Hindi Text File

Custom Chars – Hindi Text File


Custom Chars – Hindi Font File

Hindi Font File


Custom Chars – Kannada Text File

Custom Chars – Kannada Text File


Custom Chars – Kannada Font File

Kannada Font File


Tamil text File

Custom Chars – Tamil Text File


Tamil Font File

Tamil Font File

With this, just by using the grouped font – font_gpd, it is possible to display in any of the three languages in one of the following 2 methods.

Grouped Font File

Grouped Font File

  • Static Translation

  • Dynamic texts

Static Text Translation with EFR

In Flint, the EFR file serves as the translation file for storing pre-translated texts in multiple languages. Let us see how to create a table of texts with their translations and use them.

Now double click on EFR file under resources, now click on Add/Edit language option and select the desired language from language selection dialog and add the texts in different languages as shown below:

EFR - Translation file

EFR - Translation file

To use the same, drag and drop a Labels widget and map the Group font to it. Then open data file, create Data Variable to represent the total number of languages to be accommodated as shown below,

Data Variable – Active language

Data Variable – Active language

and then create Data Bridge for the texts, select Conversion as Translation and select the translation id from the dialog and add the data variable (Active Language) to it as shown below:

Data Bridge for Text

Data Bridge for Text translation

Now map the data-bridge to the corresponding textboxes. Then go to flint.efp , click Supported Language tab. Select the required languages that are to be exported.

EFP-Supported Language

EFP-Supported Language

Now export and simulate the project.

Simulation Window (Active language-Hindi)

Simulation Window (Active language-Hindi)

Dynamic Multi-language Texts

In many cases, the text to be displayed will be dynamically received in the system via external connectivity such as Bluetooth, WiFi, CAN etc. In this case, it is not possible to go for the EFR approach. Rather, create a Data variable with UE string type and map it to the label along with selecting the font as the grouped font.

Thus, Flint offers multiple ways to show different language information and update them either statically or dynamically.

Kerning Support

Kerning is the process of adjusting the spacing between characters usually to achieve a visually pleasing result. Kerning makes character spacing more uniform and pleasant to read.

kerning between characters

kerning between characters

Flint allows the user to modify the properties of a font, including its kerning table. Some fonts may require kerning with some letter pairs while others may not. To enable kerning for fonts, open the font file in Flint, enter the point value by which to expand or condense the space to the right of Default Kern Value under Font Information as shown below

Font Kerning

Font Kerning

Image/Custom Kerning

Flint also supports kerning for image-based fonts. To enable kerning, open the font file in Flint, check the box for Character Wise Kerning under Font Information. Now click on the Kern table in which the user can choose the kern value to adjust the spacing between characters which is required.

Image based font kerning

Image based font kerning

For more details, watch the Flint tutorial video for Multilingual Feature Support in the link below:

Part-I https://www.youtube.com/watch?v=TkHhjlG3Frk

Part-II https://www.youtube.com/watch?v=CeRJa2IvDZg