Skip to content

Conversation

@echoja
Copy link
Owner

@echoja echoja commented Jan 18, 2026

This pull request updates the locale selection logic in the useLocale hook to improve how the user's language preference is determined based on the URL path and cookies. The new logic ensures that Korean content routes always use the default locale and prioritizes extracting the locale from the pathname.

Locale selection logic improvements:

  • Updated useLocale in src/modules/i18n/useLocale.ts to prioritize extracting the locale from the pathname, enforce default locale for /article/... routes, and fall back to the cookie or default locale for other cases.

홈에서 블로그 포스트 클릭 시 영문 UI로 표시되는 버그 수정.
기존 /article/... 경로의 콘텐츠는 모두 한국어이므로,
이 경로에서는 쿠키의 locale을 무시하고 기본 locale(ko)을 사용하도록 변경.
@vercel
Copy link

vercel bot commented Jan 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
springfall Ready Ready Preview, Comment Jan 18, 2026 10:16pm

- useLocale()에서 쿠키 기반 locale 로직 제거
- URL에 locale이 명시된 경우(/ko/..., /en/...)만 해당 locale 사용
- 그 외 모든 경로는 기본 locale(ko) 사용
- 언어 전환 링크도 쿠키 설정 없이 직접 이동하도록 변경

이 변경으로 경로 간 이동 시 locale이 일관되게 유지됩니다.
쿠키 기반 locale 설정을 사용하지 않으므로 set-locale 엔드포인트 삭제
@echoja echoja merged commit 01a7c5a into main Jan 19, 2026
7 checks passed
@echoja echoja deleted the claude/fix-blog-redirect-bug-EADcz branch January 19, 2026 22:59
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.

3 participants