shoui520.github.io icon indicating copy to clipboard operation
shoui520.github.io copied to clipboard

A better way to enable language switcher for TheMoeWay site

Open duyk471 opened this issue 1 year ago • 0 comments

I talked to shoui about this and have already submitted the translation. But there's a problem, there is no bugless way to do so, another option is to use mkdocs-static-i18n but as shoui himself/herself (idk) stated:

I can't change the hyperlinks
it will break SEO and peoples bookmarks
i will not add /en/

I finally came up with a better solution: using Github Pages to host the translated versions. Here is the config snippet:

extra:
  alternate:
    - name: English
      link: /
      lang: en
    - name: Tiếng Việt
      link: https://daihocmo.github.io/tieng-nhat/
      lang: vi

If you change the language to Tiếng Việt (Vietnamese), it will redirect to the Vietnamese site (which is hosted on Github Pages, in another repo)

duyk471 avatar Sep 01 '24 04:09 duyk471