Localized Text Field Component #1308
Replies: 5 comments 28 replies
-
Hey @manuelebagnolini — thank you for going into such detail here. We really appreciate it! We're actually going to be working on improving our localization experience over the next few months, and I think we can make a lot of this easier for you and your team. Many of the ideas that you're referencing could end up being possible for sure.
Actually, you can! Use As for the concrete items that we plan to take on and build, I will update this thread once we have had time to nail them all down. But this is good stuff. |
Beta Was this translation helpful? Give feedback.
-
I share an update on the development of the feature. In details we added:
We are currently having problems saving so we opened these issues: #1415, #1419 Instead of calling an API for each locale it would be more efficient to call a single API to massively update all languages. Could it be added to this discussion: #1382? |
Beta Was this translation helpful? Give feedback.
-
@manuelebagnolini if I'm understanding correctly you're developing this feature outside of the mainline payload project correct? Do you have any indication if this will be brought in to the core? |
Beta Was this translation helpful? Give feedback.
-
Hi @simonereda we will definitely share the repo, at the moment it is still private because the plugin is part of a mono repo where the rest of the project is not yet possible to make it public. Furthermore this plugin is still an alpha version that still needs more testing. |
Beta Was this translation helpful? Give feedback.
-
Hi @manuelebagnolini the more I've been using this the more I've come to feel the mix of localized and non-localized fields on a given edit view is going to be very confusing for our editors. As such, I'd like to suggest something that might seem a bit drastic - what if on all "translation" views, non localized fields were fully disabled and only enabled on the "default" language view? I think the UX would need to be thought through a bit, but IMO would be a big improvement overall. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
we are a web agency with more than 20 years of experience and we are deciding to replace our custom-made CMS with a modern headless CMS, and we’ll really like to use Payload CMS.
The only feature we are missing is the possibility to have a localized field component that permits to:
This is an example of how our custom CMS actually works:
The default language (English) value is shown in the field header and in the input field of the English tab. Just by looking at this, the user knows that this is a localized text field and that it’s currently localized in English and Italian.

By selecting the Italian tab the user can see and edit the Italian localization.

By selecting the feature “Add text in a language” the user can select one of the available languages not yet used for the field, in this example the French tab will be added and the user could provide the French localized value.

We are used to build complex sites with a lot of different languages (usually more than 10) and this feature is indispensable for us for choosing our new CMS.
Our customers find this system very intuitive, and we think it would be a great addition to Payload CMS.
Obviously, we don’t expect the component to be exactly like the one of our custom-made CMS, the pictures are just an example to explain the feature, the new component should be integrated with the style and UX of the Payload CMS Admin UI.
You could be interested to include this feature in Payload CMS?
In case we would be available to actively collaborate in the development.
Looking at the code, we should be able to create our own custom UI component but the problem is that the field value of the localized field is flattened to the current locale and we can’t load and save the JSON data containing all the languages at once.
Our basic idea is to create a new version of the
useField
hook (i.e.,useLocalizedField
) that works with not flattened localized fields like in thebeforeRead
collection hook. We understand that is a major change in the Payload CMS core regarding the data access of the collections.Beta Was this translation helpful? Give feedback.
All reactions