You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/refguide/modeling/menus/translatable-texts/_index.md
+27-27Lines changed: 27 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ weight: 50
7
7
8
8
## Introduction
9
9
10
-
Mendix is designed so that it is easy to present the same information to users who have different language requirements. To support this, all texts that are presented to the end-user can be translated to different languages.
10
+
Mendix makes it easy to present the same information to users who have different language requirements. All text presented to end users can be translated to different languages.
11
11
12
12
These *translatable texts* include the following:
13
13
@@ -30,15 +30,15 @@ When you have multiple languages set up in your app, you can choose a language t
30
30
* using the drop-down in the lower-right corner of Studio Pro's main window
31
31
* using the <kbd>Ctrl</kbd> + <kbd>L</kbd> or <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>L</kbd> keyboard shortcut combinations, which cycle through the configured languages
32
32
33
-
When working in a language which is not the default, you can identify texts that have not been translated yet. These show the text in the default language between angle brackets. For example, `<Name>`. You can replace the text with the appropriate translation, and it will be replaced for the currently selected language.
33
+
When working in a language that is not the default, you can identify texts that have not been translated yet. These show the text in the default language between angle brackets. For example, `<Name>`. When you replace the text with the appropriate translation, it updates for the currently selected language.
34
34
35
35
If you edit your app to add new widgets while not in the default language, any new translatable texts for those widgets will be added to the current language. The text in the default language will either be left blank or will have the placeholder text for the widget.
36
36
37
37
All untranslated texts will be displayed in the default language when you run the application.
38
38
39
-
English (US) and Dutch translations are added by default even if you do not use these languages in your app. When you add a new element (for example, a button), it will get an English and Dutch translation in the system, but you will not see it until you add those languages. You may want to delete all English and Dutch translations if you do not plan to have your app in these languages. Before deleting English (US), make sure you have another default language set up. For more information on how to delete translations, see the [Delete](/refguide/language-operations/#delete) section in *Language Operations*.
39
+
English (US) and Dutch translations are added by default even if you do not use these languages in your app. When you add a new element (for example, a button), it gets an English and Dutch translation in the system, but you will not see it until you add those languages. You may want to delete all English and Dutch translations if you do not plan to have your app in these languages. Before deleting English (US), make sure you have another default language set up. For more information on how to delete translations, see the [Delete](/refguide/language-operations/#delete) section in *Language Operations*.
40
40
41
-
If you plan to export your module/app as an add-on/solution, the best practice is to remove default Dutch translations to avoid confusion for your customers in case they plan to translate their app to Dutch. For more information, see the [Exporting Add-on Modules and Solutions](/refguide/configure-add-on-and-solution-modules/#export) section in *Configuring Add-on and Solution Modules for Publishing*.
41
+
If you plan to export your module or app as an add-on or solution, the best practice is to remove default Dutch translations to avoid confusion for your customers in case they plan to translate their app to Dutch. For more information, see the [Exporting Add-on Modules and Solutions](/refguide/configure-add-on-and-solution-modules/#export) section in *Configuring Add-on and Solution Modules for Publishing*.
42
42
43
43
{{% alert color="info" %}}
44
44
If there is no text in the default language, the end-user will see `[no translation]`. If you want the text to be blank, set the default language text to be a space rather than empty.
@@ -50,43 +50,43 @@ The **Language** menu allows you to manage additional languages and translations
| <aid="current-language"></a>**Current Language**|Choose the current language from one of the languages set up in **Language Settings…**. |*None*|
60
-
|**Select Previous Language**|Choose the previous language in the list of languages chosen in**Language Settings…**. | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>L</kbd> |
61
-
|**Select Next Language**|Choose the next language in the list of languages chosen in**Language Settings…**. | <kbd>Ctrl</kbd> + <kbd>L</kbd> |
62
-
|[Language Settings…](/refguide/language-settings/)|Choose which languages are supported by the app and configure date and time settings. |*None*|
63
-
|[Batch Replace…](/refguide/batch-replace/)|Change all occurrences of chosen translatable texts in the current language where they are identical. |*None*|
64
-
|[Batch Translate…](/refguide/batch-translate/)|Add and edit translations from a selected source language to a selected target language|*None*|
65
-
|[Language Operations…](/refguide/language-operations/)|Manipulate (for example, copy) translations between languages. |*None*|
66
-
|[Advanced Translations Import](/refguide/advanced-translations-import/)|Import translations from Excel or PO files. |*None*|
67
-
|[Advanced Translations Export](/refguide/advanced-translations-export/)|Export translations as Excel or PO files. |*None*|
59
+
| <aid="current-language"></a>**Current Language**|Chooses the current language from one of the languages set up in **Language Settings…**. |*None*|
60
+
|**Select Previous Language**|Chooses the previous language in the list of languages from**Language Settings…**. | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>L</kbd> |
61
+
|**Select Next Language**|Chooses the next language in the list of languages from**Language Settings…**. | <kbd>Ctrl</kbd> + <kbd>L</kbd> |
62
+
|[Language Settings…](/refguide/language-settings/)|Chooses which languages the app supports and configures date and time settings. |*None*|
63
+
|[Batch Replace…](/refguide/batch-replace/)|Changes all occurrences of chosen translatable texts in the current language where they are identical. |*None*|
64
+
|[Batch Translate…](/refguide/batch-translate/)|Adds and edits translations from a selected source language to a selected target language.|*None*|
65
+
|[Language Operations…](/refguide/language-operations/)|Manipulates (for example, copies) translations between languages. |*None*|
66
+
|[Advanced Translations Import](/refguide/advanced-translations-import/)|Imports translations from Excel or PO files. |*None*|
67
+
|[Advanced Translations Export](/refguide/advanced-translations-export/)|Exports translations as Excel or PO files. |*None*|
68
68
69
69
## Setting the End-User's Language
70
70
71
-
The language which is displayed to the end-user is determined by the **Language** object which is associated with the **User** object for the current end-user via the association **User_Language**.
71
+
The language displayed to the end-user is determined by the **Language** object associated with the **User** object for the current end-user via the association **User_Language**.
72
72
73
73
If the associated language is not one of those set in the app, then the end-user will see pages in the default language.
74
74
75
-
If the end-user is not associated with a language, for example they are an anonymous user, the language used depends on the user's browser or operating system settings. If the language requested is not present up in the app, then the app's default language will be used. The requested language will be as follows:
75
+
If the end-user is not associated with a language (for example, they are an anonymous user), the language used depends on the user's browser or operating system settings. If the requested language is not present in the app, then the app's default language is used. The requested language is as follows:
76
76
77
-
*for web apps – the first language which matches a language set in the app based on the browser's preferred order of languages
78
-
*for mobile apps – the operating system language
77
+
*For web apps – the first language that matches a language set in the app based on the browser's preferred order of languages.
78
+
*For mobile apps – the operating system language.
79
79
80
80
{{< figure src="/attachments/refguide/modeling/menus/translatable-texts/user-language-domain-model.png" alt="System Domain Model for User and Language" class="no-border" width="750" >}}
81
81
82
-
If you allow end-users to change their display language within the app, the changes will not be applied immediately. This is because the translatable texts for the app are already set to the end-users original language.
82
+
If you allow end-users to change their display language within the app, the changes are not applied immediately. This is because the translatable texts for the app are already set to the end-user's original language.
83
83
84
84
There are two options to ensure that the language is changed:
85
85
86
-
1. Ask the end-user to do something manually
87
-
*sign out and sign in again
88
-
*use their browser's refresh command
89
-
2. Force Mendix to reload the page – for example by doing the following:
86
+
1. Ask the end-user to do something manually:
87
+
*Sign out and sign in again
88
+
*Use their browser's refresh command
89
+
2. Force Mendix to reload the page, for example, by doing the following:
90
90
1. Add the platform supported widget [HTML / JavaScript Snippet](https://marketplace.mendix.com/link/component/56/) to your app.
91
91
2. Create a pop-up page.
92
92
3. Place the HTMLSnippet widget on the pop-up page.
@@ -95,15 +95,15 @@ There are two options to ensure that the language is changed:
95
95
96
96
{{< figure src="/attachments/refguide/modeling/menus/translatable-texts/reload-with-state.png" alt="System Domain Model for User and Language" class="no-border" width="600" >}}
97
97
98
-
{{% alert color="warning" %}}When reloading the page, the language change must be made for the `$currentUser` object of entity type `User`. It will not change the language immediately if you use an association to a specialization of the `User` entity, such as `Administration.Account`.{{% /alert %}}
98
+
{{% alert color="warning" %}}When reloading the page, the language change must be made for the `$currentUser` object of entity type `User`. The language will not change immediately if you use an association to a specialization of the `User` entity, such as `Administration.Account`.{{% /alert %}}
99
99
100
100
{{% alert color="info" %}}
101
-
The above only applies to pages *within* your Mendix application (meaning, pages that are created in Studio Pro). The labels for static pages (such as the *index.html* and *login.html* pages in the **theme** folder of your app) are generated when you create a deployment package using the default language of your app. The labels on those pages will not change for different users, they will always be the same.
101
+
The above only applies to pages *within* your Mendix application (meaning pages that are created in Studio Pro). The labels for static pages (such as the *index.html* and *login.html* pages in the **theme** folder of your app) are generated when you create a deployment package using the default language of your app. The labels on those pages will not change for different users; they will always be the same.
102
102
{{% /alert %}}
103
103
104
104
## Read More
105
105
106
-
*[Translating Your App Content](/refguide/translate-your-app-content/) – a worked example of adding a translation
106
+
*[Translating Your App Content](/refguide/translate-your-app-content/) – a worked example of adding a translation
*[Change language by clicking a link](https://community.mendix.com/link/questions/91821) – explanations and ideas in the Mendix Community for refreshing the page when the language is changed
109
109
*[Anonymous User Journey](https://community.mendix.com/link/questions/91676) – a discussion in the Mendix Community about switching languages for anonymous end-users
When you select an option, a directory selector appears. Select the directory containing the files you want to export.
21
21
22
-
A pop-up will appear confirming the start of the export.
22
+
A pop-up appears confirming the start of the export.
23
23
24
24
### Export as Excel
25
25
@@ -43,7 +43,7 @@ The formats of the Excel file for **Advanced Translations Export** and [Advanced
43
43
44
44
### Export as PO
45
45
46
-
Click **As PO (`*.po*`) files** and select a directory for the export. Studio Pro will create a subdirectory named in the format `Export_{app-name}_Po_{time-stamp}`. The translations will be saved as PO (`*.po*`) format files. The files will be named in the format `{app-name}-{language}.po` (e.g.*App-en_US.po*).
46
+
Click **As PO (`*.po*`) files** and select a directory for the export. Studio Pro creates a subdirectory named in the format `Export_{app-name}_Po_{time-stamp}`. The translations are saved as PO (`*.po*`) format files. The files are named in the format `{app-name}-{language}.po` (for example,*App-en_US.po*).
47
47
48
48
{{% alert color="warning" %}}
49
49
The formats of the PO files for **Advanced Translations Export** and [Advanced Translations Import](/refguide/advanced-translations-import/) are similar.
When you select an option, a directory selector appears. Select the directory containing the files you want to import.
20
+
When you select an option, a directory selector appears. Select the directory containing the files you want to import.
21
21
22
-
A pop-up will appear confirming the start of the import.
22
+
A confirmation pop-up window appears when the import starts.
23
23
24
24
### Import from Excel
25
25
26
-
Click **From Excel (.xlsx) file** and select a directory containing a Microsoft Excel (*.xlsx*) format file. The file needs to meet the following requirements:
26
+
Click **From Excel (.xlsx) file** and select a directory containing a Microsoft Excel (*.xlsx*) format file. The file must meet the following requirements:
27
27
28
-
* The file must be named in the format `{app-name}-translations.xlsx` (e.g. *App-translations.xlsx*)
28
+
* The file must be named in the format `{app-name}-translations.xlsx` (for example, *App-translations.xlsx*).
29
29
* The file must have the following columns:
30
30
*`Mendix Reference`
31
31
*`Module`
@@ -45,13 +45,13 @@ The formats of the Excel file for **Advanced Translations Import** and [Advanced
45
45
46
46
### Import from PO
47
47
48
-
Click **From PO (.po) files** and select a directory containing PO (*.po*) format files. The files must be named in the format `{app-name}-{language}.po` (e.g.*App-en_US.po*).
48
+
Click **From PO (.po) files** and select a directory containing PO (*.po*) format files. The files must be named in the format `{app-name}-{language}.po` (for example,*App-en_US.po*).
49
49
50
50
{{% alert color="warning" %}}
51
51
The formats of the PO files for **Advanced Translations Import** and [Advanced Translations Export](/refguide/advanced-translations-export/) are similar.
52
52
{{% /alert %}}
53
53
54
-
After completion, a confirmation pop-up appears. If the operation fails, a failure pop-up is displayed instead.
54
+
After the import completes, a confirmation pop-up window appears. If the operation fails, a failure pop-up window appears instead.
0 commit comments