You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: Flash of default language before applying user preference #126
When a user's system or preferred language is not the default (en) (e.g., ar), the page initially renders in English and then re-renders in the expected language. This causes a noticeable flash of incorrect content and potentially hydration mismatches.
Tasks
Investigate the initialization logic in the language provider or layout.
Implement server-side language detection (via Accept-Language header, cookies, or Next.js middleware) so the initial HTML matches the user's preference.
Update the <html> tag's lang and dir attributes to be set correctly on the first server render.
Note
CONTRIBUTIONS ARE WELCOME!
If you want to get this issue assigned to you. Just comment 'assign me'. You will be assigned to the issue instantly via GitHub-actions bot.
Activity
fix(i18n): respect Accept-Language q-values and scope middleware
fix(i18n): server-side locale detection to remove flash of default la…