Merged
Conversation
brianjhanson
approved these changes
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
CKEditor doesn’t support all the languages that Craft does. It also often only supports the major version, not localised ones (e.g., it supports
frbut notfr-FR,fr-CA,fr-BE, etc.; doesn’t support Welsh or Icelandic, etc.).Since we’re now using imports to get the correct translation files, we need to check whether the file exists before importing it, or the field won’t render.
In order to mitigate this issue, I created a list of translation files (language codes) that ship with CKEditor and a method that will “translate” Craft’s language code to CKEditor’s. We use this language code when creating the ui translation import statement.
@brianjhanson, if you have a better idea for handling this without maintaining a list of supported languages, please let me know!
Steps to reproduce:
nullin theuserpreferencestable)defaultCpLanguagetonl-NLorde-DEoren-CAorisorcyRelated issues
#526