How does Mendix support multiple languages?

foreword

International support capabilities are crucial. The absence of such functions will encounter major challenges in terms of market competition, user experience, partnerships, and laws and regulations. These are all issues that may have a fatal impact on its success.

For example, in some countries and regions, the government may restrict or prohibit software systems that do not support local languages ​​and currencies, resulting in legal risks; for example, if it cannot adapt to various languages ​​and currencies, the software may not be able to meet the needs of the global market , thereby losing potential customers and reducing market share...

Mendix is ​​designed so that it can easily present the same information to users with different language requirements. To support this, all text presented to end users can be translated into different languages.

The business scenario assumes the following

There is a multinational enterprise that is implementing an enterprise core system and plans to deploy it in multiple countries. Against this backdrop, the core system urgently needs to support multilingual functionality for the following reasons:

  • Improve user experience and work efficiency: Supporting multilingual functions can help employees from various countries better understand and use the system, improve work efficiency, and reduce communication problems and misunderstandings caused by language barriers.
  • Compliance with local laws and regulations: In some countries and regions, according to local laws and policies, the software system must support local languages, otherwise it may lead to legal risks.
  • Facilitate cross-border integration and collaboration: Since this enterprise operates in multiple countries, multilingual capabilities will facilitate communication and collaboration between national offices and ensure smooth operation of business information and processes globally.
  • Improve corporate image and competitiveness: As a multinational company, supporting multilingual functions not only enables the company to better meet international requirements, but also demonstrates its emphasis on the global market and employee needs, thereby enhancing corporate image and market competitiveness.
  • Smooth business expansion: In the process of global business expansion, enterprises may enter different language environments. Supporting multilingual functions helps businesses quickly adapt to the new environment and lays the foundation for future expansion.

How to use the multiple language function of Mendix

  1. Let's look at the data structure first

The language displayed to the end user is determined by a Language object, which is associated with the current end user's User object via the association User_Language .

If the associated language is not one of the languages ​​set in the application, the end user will see the page in the default language.

If the end user is not associated with a language, for example if they are an anonymous user, the language used depends on the user's browser or operating system settings. If the requested language does not exist in the application, the application's default language will be used. The requested language is as follows:

  • For web applications - the first language that matches the language set in the application according to the browser's preferred language order
  • For mobile applications - operating system language

Picture1.png

Where is the language primary setting configured?

Mendix is ​​intended to be used by users in multiple languages. The Language tab of the application settings allows you to select the languages ​​supported by the application.

2.png

You can access this tab in two ways:

  1. Select the menu option Language > Language Settings ... .
  2. Open the App{Name} > Settings dialog from App Explorer and select the Language tab.

set default language

There must be a default application language. Select a default language from the drop-down list . This will contain all languages ​​that have been added to your application. It is recommended that you do this when you start developing your application.

Setting the default language has two functions:

  • If the end user is not associated with a Language entity, or if the end user's language is not enabled in the application, it will set the language that will be displayed to the end user
  • It sets the language that will be used when there are no translations for translatable text in the end user language, even if the language is enabled by the application

The initial default language is English, United States  .

add language

You can add any number of languages ​​from the list of supported languages ​​by clicking Add , selecting the desired language, and clicking OK .

3.png

Advanced Language Settings

You can set each language in the app for additional settings.

4.png

  • check integrity

If you check the Check Integrity box, you will receive a warning (or error) message in the error pane for each text that does not have an entry in the dictionary for that language.

If this is the default language, the check integrity box will be checked and you won't be able to uncheck it.

  • Custom date and time formats

You can set custom formats for:

  • date format
  • Time format
  • date and time format

Type the format string in the relevant box, and you'll see below an example of how to format the date.

Click Edit ... to open a dialog that will provide a full reference for the format string:

5.png

How to perform batch replacement

Batch replace works on the currently selected language and allows you to replace any existing text with new text.

There are a number of reasons why you might want to do this:

  • The same text should appear in different places in the app, but is entered inconsistently, e.g. sometimes capitalized and sometimes not - this will improve the user experience if you are reusing existing text in your app
  • If all occurrences of a piece of text are the same, you only need to enter the translation once - this saves time and improves consistency
  • If you find common labels or text better worded, you can change them all at once with a single command

6.png

Use batch replace

Bulk replace works with the currently selected language, so first you should choose the language you want to use. See the Use currently selected language section in the Language menu for more information .

  • Documentation/Module

You can select one or more modules to be used for batch translation. For example, you may wish to ignore text in imported modules and system modules in the default language, or focus on translating system messages into a language of your choice.

Click " Select ..." and check the module you want to work on.

7.png

The default is to work on all modules in the application.

  • source text contains

To search for similar phrases, type what you want to search for.

8.png

By default, all translatable texts in the selected module will be displayed.

Each found text will be displayed in the text column. The # column shows how many times it occurs in the selected module.

If you have selected a row, you can view the Show Occurrences section to see the object containing the text and the document in which it occurs . Double-clicking or clicking Show Appearance will open the document and select the object so you can easily see the context.

Tip: Move the dialog to the side for a better view of the document.

  • replace with

In Replace with , type the new text to use instead of the existing text. Click Replace to confirm the replacement.

9.png

Identical replacement and original text will be combined into one entry.

10.png

Export and import text

If you want to translate languages ​​outside of Studio Pro, you can export the translatable text to Microsoft Excel (  .xlsx  ) format, make your changes, and then import the changes from the updated Excel file.

This is especially useful if you're working on multiple applications and have acquired text, such as a system module, that you want to reuse.

  • Export to Excel

Click Export to Excel... to export the currently displayed text item to a Microsoft Excel (  .xlsx  ) format file.

The file will be in the format shown below:

11.png

Line 1Filter: Indicates which modules are included in the export file.

Line 2 - Indicates the language. The first column represents the current text, and the second column represents the replaced text.

Line 3 and above – display the current text

You can make changes in column B and these changes will be processed if the file is imported.

  • Import from Excel

Click Import from Excel ... to import a properly constructed Microsoft Excel (  .xlsx  ) format file.

This will do the following:

  • The selected module is set to the module on the Filter: line in the file
  • Any text that is empty in column B will be ignored
  • Any text in column A that does not match translatable text in the selected module will be ignored
  • Any text in column B that is not ignored will be entered into the Replace with column

Changes are made only when you click Replace .

The Excel file format for batch replacement and batch translation is similar. If you try to import a bulk translation file or a bulk replace file in the wrong language, you will get a warning, but you can still import it if you ignore the warning.

For more details, please refer to:

Translating Your App Content | Mendix Documentation

About Mendix

Mendix Corporation, a Siemens business, is rapidly becoming an enabler of digital transformation for enterprises. Its industry-leading low-code platform and comprehensive ecosystem integrate the most advanced technologies to help enterprises create solutions that improve interactivity, simplify operations and overcome IT bottlenecks. Mendix is ​​a leader and visionary in the eyes of authoritative industry analysts, as well as a cloud-native, open, scalable, agile and proven platform. From artificial intelligence and augmented reality, to intelligent automation and native mobility, Mendix has become the backbone of digital-first businesses. Mendix's enterprise low-code platform has been adopted by more than 4,000 leading companies around the world.

Guess you like

Origin blog.csdn.net/Mendix/article/details/132027660