Skip to content

Conversation

@mithun50
Copy link
Contributor

Implemented internationalization using i18next for UI strings and dynamic loading of localized JSON data for courses, course videos, and links.

  • Added Kannada (kn) and English (en) language options.
  • UI elements in Header, Footer, HomePage, CoursePage, and LinksPage are translated.
  • Course, video, and link content is loaded based on the selected language, with English as a fallback.
  • Created example translated content for Kannada.
  • Updated README.md with documentation for the i18n setup and contribution guidelines for translations.

Known Issue: Localization for blog posts (titles, descriptions, and markdown content) is incomplete due to persistent technical difficulties in modifying src/utils/blogUtils.ts. The utility currently only loads default English blog content.

Implemented internationalization using i18next for UI strings and dynamic loading of localized JSON data for courses, course videos, and links.

- Added Kannada (kn) and English (en) language options.
- UI elements in Header, Footer, HomePage, CoursePage, and LinksPage are translated.
- Course, video, and link content is loaded based on the selected language, with English as a fallback.
- Created example translated content for Kannada.
- Updated README.md with documentation for the i18n setup and contribution guidelines for translations.

Known Issue: Localization for blog posts (titles, descriptions, and markdown content) is incomplete due to persistent technical difficulties in modifying `src/utils/blogUtils.ts`. The utility currently only loads default English blog content.
@netlify
Copy link

netlify bot commented Jun 23, 2025

Deploy Preview for engineeringinkannada ready!

Name Link
🔨 Latest commit 5ea0200
🔍 Latest deploy log https://app.netlify.com/projects/engineeringinkannada/deploys/685975abf350b80008ab657c
😎 Deploy Preview https://deploy-preview-57--engineeringinkannada.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

mithun50 and others added 16 commits June 23, 2025 18:43
Adjusted the dynamic import mechanism in HomePage, CoursePage, and LinksPage components.

The previous logic incorrectly attempted to load specific `.en.json` files as an intermediate fallback, causing a build failure when these files were not present.

The updated logic is now:
1. If the current language is non-default (e.g., 'kn'), attempt to load the language-specific JSON file (e.g., `courses.kn.json`).
2. If the language-specific file is not found OR if the current language is the default ('en'), directly load the base JSON file (e.g., `courses.json`).

This ensures that the application correctly falls back to the default English content without trying to resolve non-existent `.en.json` files, thus fixing the Netlify build error.
This commit significantly expands the internationalization features:

- Added and verified `i18next-http-backend` version `^2.2.0` in `package.json`.
- Translated static UI elements on the Leaderboard page.
- Provided complete Kannada translations for all existing course data (`courses.kn.json`), all associated video titles (`src/data/videos/*.kn.json`), and all link page content (`links.kn.json`).
- Corrected dynamic import fallback logic in `HomePage.tsx`, `CoursePage.tsx`, and `LinksPage.tsx` to prevent build errors and ensure proper fallback to default English content.
- Updated `README.md` with comprehensive i18n documentation.

All implemented UI translations and dynamic content loading for courses, videos, and links have been tested and function as expected with English and Kannada languages, including fallbacks.

Known Issue:
- Localization for blog posts (titles, descriptions, and markdown content) remains incomplete. Persistent technical difficulties were encountered while attempting to modify `src/utils/blogUtils.ts` to support loading localized blog files. Therefore, blog content will still only appear in English.
- Added a console warning in `services/github.ts` to alert developers if `VITE_GITHUB_TOKEN` is not set, which is crucial for leaderboard functionality.
- Updated `README.md` to strongly emphasize the necessity of configuring `VITE_GITHUB_TOKEN` in the deployment environment for the leaderboard to load data correctly.

This addresses the issue where the leaderboard might fail to load on deployed instances due to missing API token configuration, by making the requirement clearer and aiding developers in diagnosing the problem.
… updates

This commit finalizes the internationalization effort and addresses leaderboard loading concerns.

Key changes:
- Ensured `i18next-http-backend` is correctly versioned in `package.json`.
- Translated UI elements on the LeaderboardPage.
- Provided complete Kannada translations for all existing course data, video titles, and link page content.
- Corrected dynamic import fallback logic in page components to resolve potential build errors.
- Provided code for manual update of `src/utils/blogUtils.ts` to enable blog post internationalization (loading of `metadata.[lang].json` and `content.[lang].md`).
- Created translated metadata and content for the existing blog post (`blog-1.kn.json`, `blog-1.kn.md`).
- Improved developer awareness for missing `VITE_GITHUB_TOKEN` for leaderboard via console warning.
- Updated `README.md` with comprehensive i18n documentation and clearer instructions for `VITE_GITHUB_TOKEN`.

With the manual update of `blogUtils.ts` by the user, the application now supports comprehensive English and Kannada translations across UI and content, including blogs.
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.

1 participant