Replies: 3 comments 1 reply
-
|
Definitely something that should be implemented. We can switch language of control panel and all its built in text content, like "save", "delete" and such, but we cannot do the same for the fields. This is detrimental to multi-lingual teams working on the same project. Not to mention that some field labels or settings are sometimes used on the frontend too, like mentioned table headings. |
Beta Was this translation helpful? Give feedback.
-
|
So according to this issue #13763 it looks like row headings in CP are always statically translated according to CP language, not selected site language. So I also propose there should be some way for row headings to be translated according to selected site language, not CP language. It would make sense in cases when row headings are treated as content and rendered by twig in frontend. So row headings language in backend should match the frontend. I tried to make it work myself and its easily achievable by simple edit in https://github.com/craftcms/cms/blob/develop/src/fields/Table.php So basically replace this block: By this block: |
Beta Was this translation helpful? Give feedback.
-
|
Still hope this will be improved someday :) |
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.
-
Hello,
specific example is Table field with Row headings as described here: #13231
If you create such Table you cannot translate the predefined Row headings because they are defined in Field itself as Default values.
So the headings Width, Height and Length from example will stay in English even in other language site.
Right now it can be partially solved by Static message translations which can translate the strings. https://craftcms.com/docs/4.x/sites.html#static-message-translations
This works for Twig output. But it will stay untranslated in control panel which can lead to confusion.
Edit: After the improvement it now gets translated, but according to CP language, not site language. This means if you prefer English CP and edit German site you will see the row headings in English which is wrong since they are part of the content.
If the Field default values could be made translatable for each site/language it would make things easier.
It makes sense if Default values in each field match the target language.
Edit: Specifically for Default values, Row Headings and other strings used in frontend the translation should be according to site language, not CP language. So if you use CP in English and edit German site then Default values and Row Headings should be translated to German.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions