Replies: 7 comments 10 replies
-
Hey @Rar9 I agree that some TLC here is needed, and I will mark this as Thanks for bringing this up! |
Beta Was this translation helpful? Give feedback.
-
+1 for the all points above. Also quite a bit of activity here in other areas. Would an RFC approach help in setting goals / feature priority in the next iteration of i18n? |
Beta Was this translation helpful? Give feedback.
-
UI improvementsSwitching only the current documents' locale as proposed in #1308 would definitively be an improvement on the current UI. Translating from default local to anotherAt our agency we create lots of websites that have multiple languages. Most of the time a translation of a page won't be 100% the same block for block. This fact makes it so that we cannot have the localisation on the block fields level. i.e. we need to localise on the block field: const Page: CollectionConfig = {
slug: 'pages,
fields: [
{
type: 'blocks',
name: 'Content',
localized: true,
blocks: [
CallToAction,
],
},
],
}; The issueThis would create a bit of an issue for the translator, as soon as they switch to the locale they're translating to they lose all the original structure and content. ProposalI see two possible solutions to this. The first one would be to add an option of copying structure (blocks) and/or content from the origin locale. The second one would to make switching between locales more of an operation. For the former it could be opt in. So when you've configured locales to give the c/p option you would get a button in the collection edit view to c/p structure and/or content. This operation would only run once, so after it's clicked the button disappears. Similarily the c/p operation should probably not an option after saving the document. The latter suggestion assumes that there's a locale switcher within the collection edit view. This switcher would have a separation between locales that have already been translated/copied and those who have not, i.e. "en | es | copy to de" . When selecting the "copy to" option a prompt appears where the user selects between copying structure, structure and content or creating a blank translation. I've added a graphic that shows a dropdown where the current locale is english, where german is already translated but spanish and french aren't. |
Beta Was this translation helpful? Give feedback.
-
Update on "Improve visibility of active locale" described above, it's done 🎉 See this discussion for all the details and my comment here for the latest update. This will get released in Payload 2.0. The other two items, "Visually differentiate localized fields from non-localized fields" and "Allow editing multiple locales at once" are still in the design phase but are high in priority. Will post updates as we have them. |
Beta Was this translation helpful? Give feedback.
-
Feature Request: Dynamic Addition of Languages for Multi-Tenant Platforms Suggestion: For more flexible and inclusive multi-tenant platforms, perhaps the administrators or users could have the ability to add languages dynamically rather than them being hardcoded into the config. User Flexibility: Tenant wouldn't be restricted to using the languages set by developers, offering more freedom and flexibility when using the platform. Customization: It allows multi-tenant platforms to be more versatile for users to modify as per their requirements. |
Beta Was this translation helpful? Give feedback.
-
I found this discussion, and personally also need the First a preview of how it looks, and then how it is implemented: Taking a look at the HTML code, I saw that currently there is no CSS class for localized fields, however the form contains the current language code in the URL. So the idea is adding a custom class to all localized fields, and then using a custom SCSS file (which is loaded in the Concretely, my code looks like this: Within the collection: // Field definition adding a custom class
{
name: 'function',
label: {
en: 'Function',
de: 'Aufgabenbereich'
},
type: 'text',
localized: true,
admin: {
className: 'localized-field'
}
} Global Stylesheet: /* Using the custom class, add a pseudo before element to each label of localized inputs */
.localized-field {
.field-label::before {
display: block;
content: ' ';
background-size: 28px 28px;
height: 28px;
width: 28px;
margin: 0px 10px;
margin-top: -1px;
}
}
/* Depending on the currently active locale, show a different flag icon */
.form[action$='locale=de'] {
.localized-field .field-label::before {
background-image: url('/assets/icons/Flag_of_Germany.svg');
}
}
.form[action$='locale=en'] {
.localized-field .field-label::before {
background-image: url('/assets/icons/Flag_of_the_United_Kingdom_(3-5).svg');
}
} In this example there is a statically served directory |
Beta Was this translation helpful? Give feedback.
-
We've recently gone through our roadmap items and will be prioritizing tasks accordingly. We've created individual roadmap items for each feature planned, and will close this discussion and continue tracking on individual tasks. Here are the roadmap items related to Localization: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The is no clear indication in what language the user is actually editing in.
It is also unclear which fields are localized or generic.
Even worse, its totally impossible to see what transactions might still be missing or are incomplete.
This is especially true on mobile as the language switch is again hidden in menue
A clear indication like other cms offer it would be great to see in future updates.
Update from @tylandavis 11/28/23
We've recently gone through our roadmap items and will be prioritizing tasks accordingly. We've created individual roadmap items for each feature planned, and will close this discussion and continue tracking on individual tasks.
Here are the roadmap items related to Localization:
Update from @jmikrut 5/23/23
We need to invest time into improving the localization UX within Payload.
On the radar:
1. Improve visibility of "active" locale
Right now, the locale selector is small and hidden in the bottom-left corner. It should be more globally apparent and be instantly recognizable that you are browsing the admin UI within a given locale.
A redesign of that area of the CMS is needed, and we need to determine if it makes sense to pull the locale selector out of the sidebar entirely.
Work involved
2. Visually differentiate localized fields from non-localized fields
It's tough to identify at a glance which fields have
localized: true
, and which fields do not. We should consider extending the built-in field types with a way to denote if they are localized or not.Work involved
3. Allow editing multiple locales at once
We need to open up the possibility of editing multiple locales at once, in a way similar to how Contentful does it. The editor should be able to select which locales to show at any given time, and a field per locale should be rendered allowing the editor to view multiple locales at once.
Work involved
create
andupdate
operations to accept more than one locale's data in a single request. Similar to the way thatlocale=*
works now. This would be a backend-only change, and would be relatively isolated in nature.locale=*
oncreate
andupdate
, we should begin extending the Payload UI so that it meets design intent, showing multiple fields at a given time in the editing UI.Beta Was this translation helpful? Give feedback.
All reactions