-
-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v5] New translations
root
#6212
base: v5/develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great solution to move the logic to a separate class. π
A few things I noticed while skimming through the changes:
Excited for this, thanks! Will this include the possibility to add translations (e.g. for the panel) even if the language does not have a content language assigned to it? Some of my pages are German only, but should still have English translations for the panel. |
@tobimori In your case; multilingual is not enabled for the frontend, but you want to add translations (for example for blueprint labels) for users in different languages using the panel. Do I understand correctly? |
Multilingual is enabled, but the languages in the panel might differ from the languages in the frontend. Currently, I have a translations directory and load yaml files from a plugin. (https://github.com/tobimori/kirby-baukasten/blob/main/site/plugins/project-extended/index.php#L20) |
If there is no FR language (so |
π¦ |
This PR β¦
This was a more complex problem than I expected (always π). Because the system should be able to read, update and delete language variables both from the language file and from a custom root. It involves a breakage change, but I wanted to remove the code complexity by creating a separate
LanguageTranslations
object.Fixes
Features
translations
rootBreaking changes
Now
$language->translations()
returnsLanguageTranslations
object insteadarray
. Use$language->translations()->toArray()
.Ready?
For review team