[PAGES-43] Hide language chooser when using multi-tree for pages Created: 12/Nov/15 Updated: 08/Mar/21 Resolved: 08/Mar/21 |
|
| Status: | Closed |
| Project: | Magnolia pages module |
| Component/s: | Pages app |
| Affects Version/s: | 6.2 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Florian Fuchs | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | UX, support | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Template: |
|
||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||
| Date of First Response: | |||||||||||||
| Story Points: | 5 | ||||||||||||
| Description |
|
When using the multi-tree structure to i18n the pages, there is still the language chooser in the pages app. Now, this chooser is useless and confusing for editors, if you use the multi-tree solution to structure the different languages. So, it is necessary to configure the pages app to hide the language chooser. |
| Comments |
| Comment by Jan Haderka [ 02/Dec/15 ] |
|
Are we talking about the language chooser in top right corner of main bar in page edit view or about the selector in lower left corner of the dialog? |
| Comment by Florian Fuchs [ 02/Dec/15 ] |
|
I think both choosers are not meaningful in the pages, if I am using the multi-tree scenario for languages. |
| Comment by Espen Jervidalo [ 28/Jan/16 ] |
|
As for the language chooser in the top right corner: It can be removed in /modules/pages/apps/pages/subApps/detail/pageBar/extensions/languageSelector. |
| Comment by Antti Hietala [ 14/Mar/17 ] |
|
fuchs.florian, regarding the language dropdown in dialogs, here are couple of workarounds that are quick to do. Option 1. Define only one locale per site: only en for English site, only de for German site. This has the effect that the language dropdown in dialogs shows only one value such as "English". While seeing the dropdown might still confuse editors, they cannot choose anything from it. No options, no chance of error. Your site definitions would look like this: ├── deutsch │ ├── i18n │ │ ├── locales │ │ │ └── de │ │ │ ├── enabled = true │ │ │ └── language = de │ │ ├── enabled = true │ │ └── fallbackLocale = de │ └── mappings │ └── website │ ├── handlePrefix = /deutsch │ └── repository = website └── english ├── i18n │ ├── locales │ │ └── en │ │ ├── enabled = true │ │ └── language = en │ ├── enabled = true │ └── fallbackLocale = en └── mappings └── website ├── handlePrefix = /english └── repository = website Option 2. Decorate your dialog definitions and set i18n=false for all fields. This has the effect that the language dropdown is removed from dialogs completely. No dropdown, no confusion. Here's an example of how you would decorate the textImage dialog in the travel demo: /my-module/decorations/travel-demo/dialogs/components/textImage.yaml
form:
tabs:
- name: tabText
fields:
- name: headline
i18n: false
- name: text
i18n: false
- name: tabImage
fields:
- name: imageAltText
i18n: false
- name: imageTitle
i18n: false
- name: imageCaption
i18n: false
- name: imageCredit
i18n: false
While neither of these options is a single "switch" they should accomplish your goal. You can still get the current locale for each site and retrieve localized asset metadata. Let us know if this helps. |
| Comment by Fabian Illsinger [ 08/Mar/21 ] |
|
miruela
|
| Comment by Jan Haderka [ 08/Mar/21 ] |
|
When using single tree per language strategy, make sure to define single locale per site as well. When defining only single locale/language in the default/fallback site, the language switch is hidden automatically. |