Skip to content

feat(i18n): add English and Brazilian Portuguese translations - #25

Open
Deehlusa wants to merge 1 commit into
JayWebtech:mainfrom
Deehlusa:feat/pt-br-i18n-translation
Open

feat(i18n): add English and Brazilian Portuguese translations#25
Deehlusa wants to merge 1 commit into
JayWebtech:mainfrom
Deehlusa:feat/pt-br-i18n-translation

Conversation

@Deehlusa

Copy link
Copy Markdown

Hi @JayWebtech,

This PR adds internationalization support to AutoShorts, starting with English and Brazilian Portuguese.

What changed

  • Added react-i18next, i18next and i18next-browser-languagedetector.
  • Created src/i18n.ts with language detection, fallback to English and persistence in localStorage.
  • Added src/locales/en/translation.json and src/locales/pt-BR/translation.json.
  • Extracted all user-facing strings from src/main.tsx into translation keys.
  • Updated components to use useTranslation().
  • Added a LanguageSelector component in the header/topbar so users can switch language at runtime.

How to test

  1. Run npm install and npm run dev.
  2. Open the app and use the language dropdown (next to API Settings / Import recording).
  3. Switch to Português (Brasil) and verify all labels, settings, onboarding and modals are translated.

Notes

  • The default language follows the browser; unsupported languages fall back to English.
  • All existing behavior is preserved; only strings were externalized.

Let me know if you'd like any adjustments. Happy to help!

- Install react-i18next, i18next, i18next-browser-languagedetector
- Add src/i18n.ts with language detection and fallback to English
- Create src/locales/en/translation.json and src/locales/pt-BR/translation.json
- Extract all UI strings from src/main.tsx to translation keys
- Update components to use useTranslation() and t()
- Add LanguageSelector component integrated into header/topbar
- Persist selected language in localStorage (autoshorts_language)
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