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

Sites localization #846

Open
AlexxNB opened this issue Dec 20, 2021 · 2 comments
Open

Sites localization #846

AlexxNB opened this issue Dec 20, 2021 · 2 comments

Comments

@AlexxNB
Copy link

AlexxNB commented Dec 20, 2021

Since we have a single repo for all sites, finally we can add a localization, aren't we?

What should be translatable:

  1. Docs in corresponding repos. (right now we have documentation for Kit and Svelte fully translated to russian)
  2. Text content in components (also in packages directory).

Any ideas how to bring this to live?

@benmccann
Copy link
Member

On the code side, we'd have to setup i18n support for SvelteKit. I think people like svelte-intl-precompile as one option for handling the in-app content. But a lot of our content is served via the API, so we'd also have to setup i18n support there and I'm not quite sure how to do that.

Even if we handle everything on the tech side, there's a question of how to handle process. If a contributor adds or edits docs, how would people who want to translate docs know that? Would they just check that directory in the GitHub repo for commits every so often?

@AlexxNB
Copy link
Author

AlexxNB commented Dec 20, 2021

Looks like changes in API wont be huge. Hope @pngwn may say more...

I suppose that there will be directories like en,ru and etc in documentation in kit and svelte repos. Each language will be a copy of the en directory structure. English should be a fallback for any language, when requested localized md-file is missed. This should be done on API level, I think.

In app translation could be done with any i18n tool. Also we may need different assets for languages. For example on russian site we used patched Overpass font, because there no russian glyps in original font used on svelte sites.

To keep russian translation actual we use the Github action which tracks commits in docs subdirectory of svelte site and post them as issue in our repo. But I suggest another way. Let translated page shows notification "This page is outdated, see english page for actual information" in case when last commit in english file was made after than last commit in translated file. Anybody who see this notification can edit page to actualize translation. I think commit dates also may be acquired when building DB for API.

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

2 participants