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

Any ideas on how to implement internationalization ? #38

Open
maximeMD opened this issue Dec 22, 2021 · 2 comments
Open

Any ideas on how to implement internationalization ? #38

maximeMD opened this issue Dec 22, 2021 · 2 comments

Comments

@maximeMD
Copy link

Hey ! First, thanks for you plugin 😄

I copied your code to make a local plugin for my app, because I neede to change the configuration file (which cannot be currently changed on Strapi v4), but also because I needed to have the CKEditor to be displayed in my language.

I successfully implemented the correct language, with a import "@ckeditor/ckeditor5-build-classic/build/translations/fr"; in my custom CKEditor/index.js file.

I would like to contribute on how to implement internationalization for this plugin, which could use the Strapi interface language, but I'm quite lost between all the different docs. All that I have understand is that it's not easy, because the translation file should be implement at build time...

Any hints on how to implement the feature ?

@roslovets
Copy link
Member

Hi, internationalization works in v3, but I temporarirly dropped it from v4 because I can't understand how to implement it either.
Unfortunately current Strapi documentation does not cover lot's of stuff. That's why I also disabled custom configuration.

The main stopper for internatialization is I can't understand how to do get current UI language from Strapi API. That's how it works in v3:

const { formatMessage, currentLocale } = useGlobalContext();

FYI CKEditor build for this plugin already contains lots of i18n files:
https://github.com/Roslovets-Inc/ckeditor5-build-strapi-wysiwyg/tree/gh-pages/build/translations

@ihmpavel
Copy link
Contributor

ihmpavel commented Apr 21, 2022

Hi, maybe this strapi plugin should help?

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