Skip to content

Commit

Permalink
Merge pull request #22 from tnfshcec/feat/i18n
Browse files Browse the repository at this point in the history
feat: i18n
  • Loading branch information
HeyLoon authored Dec 13, 2023
2 parents 9a984d2 + d7a4727 commit bde6d01
Show file tree
Hide file tree
Showing 23 changed files with 1,089 additions and 101 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,16 @@ As for why a typical database is not used, this is because:
Post route in the url is directly mapped to the filesystem, eg:

`https://<domain>/post/path/to/post` -> `cec/path/to/post.md`

### Internationalization (i18n)

This project uses [inlang](https://inlang.com/) with `paraglide.js` for i18n.
Translation files are stored in `src/messages/[lang].json`, where `lang` is the target language.

Currently supported languages: `zh-tw`, `en`, `ja`

To add a translation, follow the steps below:
1. Add your target language in `tnfshcec.inlang/settings.json`, under the `languageTags` array (ex:`de`).
2. Copy one of the translation files in `src/messages/[lang].json`, renaming it to your target language.
3. Do the translations in the file you copied.
4. Update the languages listed above (the README).
Loading

0 comments on commit bde6d01

Please sign in to comment.