Adding Translated Documents #23
-
Can I add localized document pages? For example, imagine that the site has a Japanese translation of the documentation under "ja-jp". |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There's nothing in-the-box right now, though you could certainly add folders like
{
"foo": "buzz"
}
{
"foo": "bazz"
} Then use those values inside a Razor template with something like Eventually Statiq will get some built-in localization support, I'm just not sure yet when that'll be or what it'll look like. |
Beta Was this translation helpful? Give feedback.
There's nothing in-the-box right now, though you could certainly add folders like
input/ja-jp
directly and the files inside would output to that location. Another approach I've seen is to load JSON files with various translations and locales:en-us.json
:ja-jp.json
:Then use those values inside a Razor template with something like
Outputs["ja-jp.json"].First().GetString("Foo")
. A more sophisticated setup could even put the translation files in a subdirectory, iterate on them, and produce an output document for each one. This approach works well when you've got common content with just a handful of things that need to be translated.Eventually Statiq…