Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFT Page] - I18N & Language Switching #23

Merged
merged 1 commit into from
Oct 22, 2021
Merged

[NFT Page] - I18N & Language Switching #23

merged 1 commit into from
Oct 22, 2021

Conversation

tx0c
Copy link
Contributor

@tx0c tx0c commented Oct 21, 2021

how about a lightweight solution like this to keep all translation messages in the source code,

when there aren't too many messages, looks more lightweight than any of react-intl, react-i18next, or Lingui.
https://www.gatsbyjs.com/blog/2020-07-28-introducing-gatsby-i18n-theme/

resolves #9

@tx0c tx0c self-assigned this Oct 21, 2021
@tx0c tx0c marked this pull request as draft October 21, 2021 06:27
@tx0c tx0c force-pushed the feat/i18n branch 2 times, most recently from 80adccb to 7df5533 Compare October 22, 2021 04:38
@tx0c tx0c marked this pull request as ready for review October 22, 2021 04:41
@tx0c tx0c requested a review from robertu7 October 22, 2021 04:41

<Footer />
</ClientContext.Provider>
<ClientContext.Provider value={client}>{children}</ClientContext.Provider>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems the plugin gatsby-theme-i18n has a bug, and here I have to move elements from layout into the page, this solution might be ok we don't have too many pages, just copy the Header and Footer to every page

Components in wrapPageElement cannot access the current locale #138
gatsbyjs/themes#138 (comment)

Copy link
Contributor

@devformatters devformatters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 🧑🏼‍🎨

@tx0c tx0c merged commit 0661540 into develop Oct 22, 2021
@tx0c tx0c deleted the feat/i18n branch October 22, 2021 21:59
tx0c added a commit that referenced this pull request Oct 24, 2021
1. https://nft-develop.matters.news/         (zh-han traditional is working)
2. https://nft-develop.matters.news/en/      (english is working)
3. https://nft-develop.matters.news/zh-hans/ (not working if directly access)

[NFT Page] - I18N & Language Switching #23
[NFT Page] - I18N & Language Switching 5pt feature request #9
tx0c added a commit that referenced this pull request Oct 24, 2021
1. https://nft-develop.matters.news/         (zh-han traditional is working)
2. https://nft-develop.matters.news/en/      (english is working)
3. https://nft-develop.matters.news/zh-hans/ (not working if directly access)

[NFT Page] - I18N & Language Switching #23
[NFT Page] - I18N & Language Switching 5pt feature request #9
tx0c added a commit that referenced this pull request Oct 25, 2021
1. https://nft-develop.matters.news/         (zh-han traditional is working)
2. https://nft-develop.matters.news/en/      (english is working)
3. https://nft-develop.matters.news/zh-hans/ (not working if directly access)

- [NFT Page] - I18N & Language Switching #23
- [NFT Page] - I18N & Language Switching 5pt feature request #9
tx0c added a commit that referenced this pull request Oct 25, 2021
1. https://nft-develop.matters.news/         (zh-han traditional is working)
2. https://nft-develop.matters.news/en/      (english is working)
3. https://nft-develop.matters.news/zh-hans/ (not working if directly access)

- [NFT Page] - I18N & Language Switching #23
- [NFT Page] - I18N & Language Switching 5pt feature request #9
tx0c added a commit that referenced this pull request Oct 25, 2021
1. https://nft-develop.matters.news/         (zh-han traditional is working)
2. https://nft-develop.matters.news/en/      (english is working)
3. https://nft-develop.matters.news/zh-hans/ (not working if directly access)

- [NFT Page] - I18N & Language Switching #23
- [NFT Page] - I18N & Language Switching 5pt feature request #9
@tx0c tx0c mentioned this pull request Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[NFT Page] - I18N & Language Switching
2 participants