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

Internationalization of the CMS #1166

Closed
hdoro opened this issue Mar 10, 2018 · 4 comments
Closed

Internationalization of the CMS #1166

hdoro opened this issue Mar 10, 2018 · 4 comments

Comments

@hdoro
Copy link
Contributor

hdoro commented Mar 10, 2018

- Do you want to request a feature or report a bug?
Request - adding internationalization behaviors to the CMS

- What is the current behavior?
Devs must duplicate collections/files in order to provide multilingual support for the content and the CMS itself is a bit of a pain to translate.

- What is the expected behavior?
For the admin: The interface translates itself automagically through i18n Javascript objects and the browser's language. It'd work quite similar to SnipCart's Localization API
For the content: Devs can specify when files/folders have multiple languages in the config.yml, and the CMS generates the other language files based on the configured file extension (ex: .es.md for Hugo's), giving the users contextual editing through tabbed inputs for each language.

I find it hard to explain what I mean by the previous phrase by text, so here goes a screenshot:
image

Also, I've dived deeper into the reasons behind each choice as well as gave my take on this based on my experience in this YouTube video! Any doubts let me know 😄

@erquhart
Copy link
Contributor

Love the UI concept here @hcavalieri!

Regarding the UI itself, we have the same kind of setup described by Snipcart in a PR that's very close to ready: #974

For the i18n field concept, individual widgets would probably have to opt in and handle their own UI, but we could maybe provide a default component like the one in your screengrab.

@Benaiah
Copy link
Contributor

Benaiah commented Mar 14, 2018

Content i18n that's based on separate files should probably wrap the tab container around the entire editor view instead of a specific widget, unless we want to ensure that all other fields remain the same in both (in which case, what do we do if they diverge?). The UI in the screenshot seems to correspond more closely with an internationalization scheme that uses different keys on the same object - and, if that approach were used, should be feasible to implement using the current widget API. The most difficult aspect of that approach would probably be making your SSG understand the content, as it would need to be structured data instead of a typical markdown-with-frontmatter format.

@erquhart
Copy link
Contributor

@Benaiah nice, building this into the editor at large makes a lot of sense. I'd say this moves away from the dog-ear approach, but some kind of button group to switch between languages makes sense. I'd rather not see a dropdown since validation will need to occur across all languages, e.g. required fields, to ensure an entry is complete for all. We'll want max visibility for that.

@erquhart
Copy link
Contributor

Closing in favor of #716, forgot about that one.

@hcavalieri please chime in on that issue, let's keep this moving!

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

No branches or pull requests

3 participants