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

i18n #267

Open
notramo opened this issue Jan 30, 2023 · 4 comments
Open

i18n #267

notramo opened this issue Jan 30, 2023 · 4 comments

Comments

@notramo
Copy link

notramo commented Jan 30, 2023

Design a user-friendly i18n solution which is integrated with the Plenti CMS, but also supported by Weblate.

@jimafisk
Copy link
Member

Thanks for the suggestion @notramo! Can you explain a little more about how you envision this working? I don't know too much about Weblate, but it appears to be a python program that would need to be hosted. Is there an SDK you'd like to integrate with the editing interface, or does Weblate produce JSON that the Plenti SSG could use as a content source?

You can support different languages currently in your content source, but it wouldn't have any of the advanced features I'm sure Weblate provides. I made a small example site a while back, but there are many different ways you could accomplish the same thing.

In the future when you can make your own custom editor widgets (#219), you could build all sorts of features to support i18n.

@notramo
Copy link
Author

notramo commented Jan 30, 2023

It wouldn't be specific to Weblate, all translation platforms have similar requirements, but Weblate is the most advanced open source one. Also, they offer a hosted version which is free for open source projects.

When an editor adds a new string, they shouldn't have to care about how many languages it is translated to. They just add the string in their main language, and the translation platform should do the rest.
When they change a string, they shouldn't have to bother changing it in every translation, as Weblate tracks it automatically.

Thanslation files can be these two formats (I don't know the exach schema, but it's enough for demonstration.):

{
  "key1": "translation string",
  "key2": "another string"
}
{
  "English string": "localized string",
  "another English string": "another localized string"
}

So basically Weblate (and other translation platforms) require a specific JSON schema.

The UX in the CMS should be the ideally same as non-localized sites, or probably add a checkbox next to the string inputs with “translatable” label (to prevent translating some strings).

@blahetal
Copy link

Thanks for the suggestion @notramo! Can you explain a little more about how you envision this working? I don't know too much about Weblate, but it appears to be a python program that would need to be hosted. Is there an SDK you'd like to integrate with the editing interface, or does Weblate produce JSON that the Plenti SSG could use as a content source?

You can support different languages currently in your content source, but it wouldn't have any of the advanced features I'm sure Weblate provides. I made a small example site a while back, but there are many different ways you could accomplish the same thing.

In the future when you can make your own custom editor widgets (#219), you could build all sorts of features to support i18n.

Hi, looking at your sample project which supports EN and FR language switching, would it work if CMS is enabled? I mean, when I am on EN page and CMS is enabled, I will be editing EN texts, right?

@jimafisk
Copy link
Member

Hi @blahetal, sorry this slipped through the cracks! Yes editing the page in each language individually should work like you said.

I just added a quick login button and pushed the changes to the example site if you want to take a look:

Click to see gif

multilingual2

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