Skip to content
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

Missmatch between "norsk bokmål" craft languageid and redactor languageid #99

Closed
nettum opened this issue Oct 23, 2018 · 2 comments
Closed
Assignees

Comments

@nettum
Copy link
Contributor

nettum commented Oct 23, 2018

In craft Craft::$app->getLocale()->getLanguageID() return nb if you set "norsk bokmål" as language. Redactor uses no:
https://github.com/craftcms/redactor/blob/v2/lib/redactor/lang/no.js
https://github.com/craftcms/redactor/blob/v2/src/assets/redactor/RedactorAsset.php#L47

The correct way to differentiate between "norsk bokmål" and "norsk nynorsk" according to ISO 639-1 is to use nb and nn. See https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

Should /lib/redactor/lang/no.js be renamed to /lib/redactor/lang/nb.js?

@brandonkelly
Copy link
Member

@nettum Sorry, we overlooked that. We get those language files directly from Imperavi (maker of Redactor) so going to stick with their language IDs (no in this case). So instead the next release will just check if the current locale is nb or nn and if so, end up using Redactor’s no.js language file.

@nettum
Copy link
Contributor Author

nettum commented Oct 29, 2018

thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants