Add internationalization support with i18next and new locales#47
Open
thedavidweng wants to merge 13 commits intorutikwankhade:masterfrom
Open
Add internationalization support with i18next and new locales#47thedavidweng wants to merge 13 commits intorutikwankhade:masterfrom
thedavidweng wants to merge 13 commits intorutikwankhade:masterfrom
Conversation
- introduce i18n setup with i18next and react-i18next
- wire translation hooks in Header, Home, Editor, Faq
- add LanguageSwitcher component and integrate in header
- update package.json with i18n dependencies and init files
- add src/i18n scaffold and import in index.js
- ensure UI texts use t('...') keys
extend i18n resources to include new locales: es, fr, de, ja, ko, pt, ru, ar, hi, it, nl, pl, tr, vi, th, id, uk update en.json and zh.json translations for consistency update LanguageSwitcher to use an expanded language list and adjust its styling for the new options
update i18n and React ecosystem versions to satisfy peer dependencies and compatibility constraints across i18next, react, react-router-dom, and related libraries
Agent-Logs-Url: https://github.com/thedavidweng/CoverView-CN/sessions/935dcac2-c0d0-4485-8b27-7386eee5ad07 Co-authored-by: thedavidweng <95214375+thedavidweng@users.noreply.github.com>
Upgrade Node.js version to 24.x
…193-b546-52e206085453 Add internationalization support with i18next and new locales
Agent-Logs-Url: https://github.com/thedavidweng/CoverView-CN/sessions/0f52f19d-a9c7-4319-bbfb-d03546592356 Co-authored-by: thedavidweng <95214375+thedavidweng@users.noreply.github.com>
…equirements Fix ESLint build failure: remove unused `unsplashImage` variable
replace react-select with a native HTML select for language switching adjust change handler to read e.target.value default currentLang to i18n.language || 'en' remove react-select props, styling, and dependency in this file
…d0b-93cd-5839dc54c4b4 refactor(language-switcher): switch to native select
|
@thedavidweng is attempting to deploy a commit to the Rutik Wankhade's projects Team on Vercel. A member of the Team first needs to authorize it. |
…d0b-93cd-5839dc54c4b4 chore(plans): delete obsolete i18n plan file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces internationalization (i18n) support across the app, refactors the main
Editorcomponent from a class to a functional component using React hooks, and updates several dependencies. The main user-facing components now use translation keys instead of hardcoded English text, and a language switcher has been added to the header. Additionally, several packages have been upgraded or added to support these features.Internationalization (i18n) Integration:
i18next,react-i18next, andi18next-browser-languagedetectordependencies for handling translations.Faq,Header, andEditorcomponents to use translation keys (t()) instead of hardcoded strings, enabling multi-language support. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]LanguageSwitchercomponent to theHeaderfor user language selection.Component Refactoring and Modernization:
Editorfrom a class component to a functional component using React hooks (useState,useEffect). All state and event handlers were updated accordingly. [1] [2] [3] [4] [5]Dependency Upgrades and Additions:
react,react-dom,react-router-dom, andreact-selectto newer versions. Addedajvandajv-keywordsfor JSON schema validation.enginesfield.These changes lay the groundwork for supporting multiple languages and ensure the codebase is using modern React best practices.