V8: Allow localizing content types and properties using language files #5358
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prerequisites
Description
If you want to localize content type and property names in the backoffice, you currently have to do it using the dictionary. This is convenient if you have the same languages in frontend and backoffice, but if you don't... well, things get messy
From a conceptual point of view, doing backoffice localization using the dictionary isn't terribly pretty, because the dictionary is pretty much a frontend thing.
So! This PR makes it possible to do the same localization of backoffice names using the language files. The naming follows the same convention as the dictionary based localization; you add the "#"-prefix and then specify the localization key as either
[area]/[key]
or[area]_[key]
:The corresponding localization file (e.g.
en-US.user.xml
) would look something like this:And the result:
Testing this PR
en-US.user.xml
andda-DK.user.xml
).