Skip to content

Add multilanguage support (i18n)#7

Open
NikFlip wants to merge 5 commits into
Snipppppy:masterfrom
NikFlip:feat/i18n-multilanguage
Open

Add multilanguage support (i18n)#7
NikFlip wants to merge 5 commits into
Snipppppy:masterfrom
NikFlip:feat/i18n-multilanguage

Conversation

@NikFlip
Copy link
Copy Markdown

@NikFlip NikFlip commented Mar 18, 2026

This PR introduces internationalization (i18n) to GW2 Simple Timer, making the tool accessible to a broader community. Translations start with German alongside the existing English, with a language switcher in the sidebar. Adding more languages in the future is straightforward — just drop in a new translation file.

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 18, 2026

Deploy Preview for master-demo-gw2timer ready!

Name Link
🔨 Latest commit 7e8906d
🔍 Latest deploy log https://app.netlify.com/projects/master-demo-gw2timer/deploys/69c27b76eefd9b0007079f92
😎 Deploy Preview https://deploy-preview-7--master-demo-gw2timer.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.

@NikFlip NikFlip force-pushed the feat/i18n-multilanguage branch from ae23d4c to 1881088 Compare March 18, 2026 12:46
NikFlip added 4 commits March 18, 2026 15:11
Add complete i18n JSON files for EN and DE with all UI strings,
category names, event names, map names, and notes.
German translations use official GW2 API-verified names.
Minimal translation module (~70 lines, zero dependencies) that loads
JSON translation files, translates DOM elements via data-i18n attributes,
and provides getTranslation() for dynamic content. Language preference
is persisted in localStorage.
Add data-i18n attributes to static UI text (site name, browser alert,
donation text, tooltips). Add EN/DE language switcher buttons in the
header. Fix donation text typo.
Use getTranslation() for event names, map names, notes, and categories.
Add retranslateAll() for live language switching of all visible elements.
Fix localStorage check to ignore the lang key.
@NikFlip NikFlip force-pushed the feat/i18n-multilanguage branch 2 times, most recently from c9596a0 to 2274751 Compare March 24, 2026 11:50
Add styles for the EN/DE toggle buttons in the header with
active state highlighting and hover effects.
@NikFlip NikFlip force-pushed the feat/i18n-multilanguage branch from 2274751 to 7e8906d Compare March 24, 2026 11:54
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