morethanmin / morethan-log

😎 A static blog using notion database
https://morethan-log.vercel.app
MIT License
1.96k stars 1.58k forks source link

feat: Dynamic Language Support for Notion Data in NextJs #85

Open i99dev opened 1 year ago

i99dev commented 1 year ago

Problem

Currently, the Next.js application only supports pulling data from one Notion page and only supports one language.

Proposed Solution

Create separate Notion pages for each language and use the Next.js page ID to dynamically render the appropriate page when the user changes their language selection.

Implementation

graph TD;
    A[Select Language] --> B[Update Page ID];
    B --> C[Pull data from Notion];
    C --> D[Render in selected language];

I plan to implement this on my Page. Any suggestions or idea will be welcome

i99dev commented 1 year ago

https://user-images.githubusercontent.com/10709888/214547338-f2de6167-8e3f-4541-b32e-ce187dc42d19.mp4

almost done

jaktestowac commented 1 year ago

We also need content separation what can base on user locale. Any chance to have this in near future?

i99dev commented 1 year ago

Hello @jaktestowac, regarding separation based on language, it is available

image
jaktestowac commented 1 year ago

@i99dev I understand that I can use different languages when I merge your PR https://github.com/morethanmin/morethan-log/pull/87 to my blog codebase?

i99dev commented 1 year ago

@jaktestowac Hey, I merged the last commit from the original repository. you can merge and follow up on instructions on Readme file

last update

jaktestowac commented 1 year ago

@i99dev Thanks👏 I will test it for sure!