Pitayan / gatsby-theme-pitayan

A minimal blog theme plugin for Gatsby
https://pitayan.github.io/gatsby-theme-pitayan/
MIT License
30 stars 11 forks source link

support multiple languages - internalization (i18n) #22

Open ozayduman opened 1 year ago

ozayduman commented 1 year ago

It would be great to support multiple languages

daiyanze commented 1 year ago

Agree. Multi-lang support seems quite a good feature. Do you already have the idea of how to apply multiple language (maybe just different language) to your project?

ozayduman commented 1 year ago

There is a popular English learning site called engoo.com Likewise, in your theme at the top right corner language selection buton would be shown if the site supports multi-lang. The default language can be determined as user's browser language. Also fields like time to read should be localized. I think the structure of the content folder might look like this:

your-site
  ├── content/
  ├── en/
  │ ├── authors/
  │ ├── posts/
  │ └── site/
  ├── tr/
  │ ├── authors/
  │ ├── posts/
  │ └── site/
  ├── de/
  │ ├── authors/
  │ ├── posts/
  │ └── site/
..
  ├── src/
  │ └── assets/

BTW, I love your theme and I appreciate your great work multi-lang1 multi-lang2

daiyanze commented 1 year ago

Thanks for the great idea.

I think there'll be at least the following things to be optimized for multi-lang:

We also need a good plugin to bring multi-lang into this theme. https://www.gatsbyjs.com/docs/how-to/adding-common-features/localization-i18n/

Currently, I'm busy with some other projects. Don't really have the bandwidth with this feature at the moment. I'll put this feature to the roadmap after "making Tailwindcss theme preset". (PR welcome :D)