Skip to content

feat: add internationalization (i18n) and multi-language support - #293

Open
emelichev wants to merge 2 commits into
opencost:mainfrom
emelichev:main
Open

feat: add internationalization (i18n) and multi-language support#293
emelichev wants to merge 2 commits into
opencost:mainfrom
emelichev:main

Conversation

@emelichev

Copy link
Copy Markdown

What does this PR change?

  • Adds internationalization (i18n) and multi-language localization support across OpenCost UI using i18next, react-i18next, and i18next-browser-languagedetector.
    Adds full translation resources for 4 languages:
    English (en) — Default
    Russian (ru)
    Chinese Simplified (zh-CN)
    Chinese Traditional (zh-TW)
    Adds a Language selector dropdown to the Settings page under Display preferences (alongside the Currency selector) with automatic localStorage persistence and browser language detection.
    Localizes all core UI pages, layouts, and components:
    Sidebar navigation & global search shortcuts
    Home dashboard & Cost Summary cards
    Dashboards list and Dashboard builder views
    Reports list and Report Builder with configuration side-panel
    Cost Allocation widgets (charts, breakdown tables, filters)
    Cloud Cost and Infrastructure Assets widgets, tables, and time filters
    Settings, theme switches, table pagination, and common action buttons
    Fixes CommonJS lodash import compatibility for Vite SSR/dev mode.

Does this PR relate to any other PRs?

  • None

How will this PR impact users?

  • Users can switch their interface language in Settings -> Display between English, Russian, Simplified Chinese, and Traditional Chinese.
    The chosen language persists across browser sessions in localStorage.
    All text and metrics labels adapt dynamically without affecting existing dashboard configurations, API queries, or currency formatting.

Does this PR address any GitHub or Zendesk issues?

  • None

How was this PR tested?

  • Verified full production build with npm run build (0 TypeScript / bundling errors).
    Tested language switching and verified UI rendering across all routes (/, /dashboards, /dashboard/:id, /reports, /report/:id, /settings) using browser and headless automation.
    Tested persistence of selected locale in localStorage and fallback behavior to English for missing keys.

Does this PR require changes to documentation?

  • Minor: Optional note in documentation/README on supported UI languages and how to add new translation files in app/locales/*.json.

Have you labeled this PR and its corresponding Issue as "next release" if it should be part of the next OpenCost release? If not, why not?

Yes, labeled as "next release" for inclusion in the upcoming OpenCost release.

@netlify

netlify Bot commented Aug 27, 2026

Copy link
Copy Markdown

Deploy Preview for opencost-ui ready!

Name Link
🔨 Latest commit 4f4880f
🔍 Latest deploy log https://app.netlify.com/projects/opencost-ui/deploys/6a9095b7f70cd70008215feb
😎 Deploy Preview https://deploy-preview-293--opencost-ui.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant