Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

i18n solution #214

henrikvilhelmberglund started this conversation in Ideas
Discussion options

I think it would be useful to have support for multiple languages in the left side with the lesson text.

Something like this https://docs.astro.build/en/guides/internationalization/#prefixdefaultlocale-true could be useful for the languages to be at the same "depth" so you would have

src/content/tutorial/1-basics/1-introduction/1-welcome/en
src/content/tutorial/1-basics/1-introduction/1-welcome/sv

and so on.

You must be logged in to vote

Replies: 1 comment

Comment options

Hey @henrikvilhelmberglund! Thanks for starting this discussion!

I like you're idea! I think it would probably easier to support content.<locale>.md(x?). So in your example it would mean:

src/content/tutorial/1-basics/1-introduction/1-welcome/content.sv.md
src/content/tutorial/1-basics/1-introduction/1-welcome/content.en.md

In terms of URL we could map that to anything, so /<locale>/<..slugs> would work well.

FWIW, multiple languages are supported today by:

  • Adding to the top bar a language switcher
  • Modify astro's base to be <locale>
  • Make sure that every UI element text use the correct language

We've focused on this first because we have had feedback that for some project, translations are managed by different teams that prefer working on different repositories.

However for smaller teams that use a single repo, we definitely need a solution! 😃

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /