Open nkte8 opened 6 months ago
@nkte8 調査・実験した結果を報告します。
astro-i18next
は環境の問題で導入できなかったparaglide
は導入が煩雑だったため却下したastro-i18n-aut
は導入でき、言語ごとのパスの作成とパスからの言語判別まではできたastro-i18n
は導入でき、翻訳ファイルの導入とその適用ができたastro-i18n-aut
と astro-i18n
の組み合わせでいくのがよいかもしれないastro-i18n
の機能でパスに現在の言語コードを含めることができるが、それ以外のケースではどう対応するかパッケージの選出は Astro公式ドキュメントのCommunity libraries
から選出している
https://docs.astro.build/ja/recipes/i18n/
@nkte8 調査・実験した結果を報告します。
.md
ファイルの内容をレンダリングする.md
ファイルを用意し、パスに含まれる言語コードにしたがって出し分ける/i18ntest/
、/en/i18ntest/
を参照のこと/ja/
がうまくいかない.mdx
ファイルもおそらく使える。ドキュメントでより柔軟な表現をおこなうためにはこちらのほうがいいかもしれない/fr/
などとすると 404 になる@so-asano Discordで出した話を記載します
SSR
モードであればリダイレクト自体を制御することは可能
How it would to do to accomplish?
Astroでi18nを実装するにあたって、どのようにページの生成を行うかを検討する SPAページ部分、具体的には
src/pages/app.astro
およびsrc/component/Client
配下のコンポーネントの実装方法を検討するWhat it should do to accomplish?
具体的な実装方法の考案・提示