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

Multilingual support #8

Open
chucker opened this issue Jul 25, 2022 · 3 comments
Open

Multilingual support #8

chucker opened this issue Jul 25, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@chucker
Copy link

chucker commented Jul 25, 2022

A document should optionally be available in multiple languages. In this case, a file naming convention is used. For example, if a document is available in English and German, the following two files should exist:

My-feature.en.md
My-feature.de.md

ToDo

How do we do per-language titles? A YAML header?

@ricardoboss ricardoboss added the enhancement New feature or request label Jul 27, 2022
@ricardoboss
Copy link
Member

What if wee do something like we did for authorization? Add a .i18n/.lang (or something other than that) in a folder which specifies which files have which title in what language, what the default/fallback language should be and maybe even which languages to show in the first place.

fallback = "en"
visible = ["en", "de"]

[en]
foo = "How to calculate Foo"

[de]
foo = "Wie man Foo berechnet"

[fr]
foo = "WIP"

@chucker
Copy link
Author

chucker commented Oct 20, 2022

I think fallback should be global. Defining it per-folder sounds like too much work.

But… yeah, I guess we could do a folder-level list of localized titles. In this case, is foo the filename without extension?

@ricardoboss
Copy link
Member

Yeah. I'm not sure there would be a better option other than using frontmatter in each file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants