Multi Languages Support

MDMT supports multiple languages by default.
You can switch languages from the language selector (earth icon on top-right of the page).

The language selector does:

  • Redirect the browser to the URL for chosen language
  • Switch labels in sidebar / header

Configuration

You can set the languages to support in config.js.
By default MDMT supports English and Japanese.

// Supported languages
languages: {
en: "English",
ja: "ๆ—ฅๆœฌ่ชž"
}
mainLanguage: "en",

Pages for the main languages are served in the root of the URL, and other languages are served in their directories.
For example, in this website English pages are served in https://amagi.dev/MDMT/ and Japanese pages are located in https://amagi.dev/MDMT/ja/.

Translate Pages

To add translated pages, just put Markdown files under the directory for the language.
For example, in this document Japanese version of pages/index.md is located in pages/ja/index.md.