diff --git a/apps/landing/README.md b/apps/landing/README.md
index aae0f6779..08e3fb5c2 100644
--- a/apps/landing/README.md
+++ b/apps/landing/README.md
@@ -56,16 +56,15 @@ the existing components layout.
For home, showcase and components overview, add page.ko.tsx beside page.tsx and
register its pathname in src/i18n/pages.ts (home uses /). Translate the component
overview's Description.mdx as Description.ko.mdx beside it. Reuse the interactive
-components. Introduce matching keys in src/i18n/messages/en.json and ko.json,
-and load catalogs in src/i18n/request.ts, merging English defaults with Korean
-overrides per namespace. In SiteLayout, pass getMessages({locale}) to
-NextIntlClientProvider. Client components use useTranslations; server components
-use getTranslations({locale}) from next-intl/server with an explicit locale.
-These catalogs are introduced by the first TSX/shared-UI translation contribution;
-the current provider has no translated UI messages. Keep state identifiers and
+components. Shared UI copy lives in src/i18n/messages/en.json and ko.json, one
+namespace per component; add matching keys to both. src/i18n/request.ts merges
+the English defaults with the Korean overrides per namespace, and SiteLayout
+passes getMessages({locale}) to NextIntlClientProvider. Client components use
+useTranslations; server components use getTranslations({locale}) from
+next-intl/server with an explicit locale. Keep state identifiers and
component/API names unchanged.
-Shared navigation, search labels and footer belong to their own issue. Search
+The shared header, sidebars, table of contents and search use these catalogs. Search
indexes are built by script.js: Korean MDX replaces its English entry, and other
entries stay English. Use Link and usePathname from @/i18n/navigation for internal
navigation; use next/link for static assets such as /storybook/index.html.
diff --git a/apps/landing/src/app/(detail)/components/LeftMenu.tsx b/apps/landing/src/app/(detail)/components/LeftMenu.tsx
index 3439df299..5fbad57b1 100644
--- a/apps/landing/src/app/(detail)/components/LeftMenu.tsx
+++ b/apps/landing/src/app/(detail)/components/LeftMenu.tsx
@@ -1,11 +1,14 @@
+'use client'
import { VStack } from '@devup-ui/react'
+import { useTranslations } from 'next-intl'
import { MenuItem } from '../docs/MenuItem'
export function LeftMenu() {
+ const t = useTranslations('ComponentsMenu')
return (
- Overview
+ {t('overview')}
- Form
+ {t('form')}
- Layout
+ {t('layout')}
- Theme
+ {t('theme')}
)
diff --git a/apps/landing/src/app/(detail)/docs/LeftMenu.tsx b/apps/landing/src/app/(detail)/docs/LeftMenu.tsx
index 67873d607..db5adc836 100644
--- a/apps/landing/src/app/(detail)/docs/LeftMenu.tsx
+++ b/apps/landing/src/app/(detail)/docs/LeftMenu.tsx
@@ -1,48 +1,54 @@
+'use client'
import { VStack } from '@devup-ui/react'
+import { useTranslations } from 'next-intl'
import { MenuItem } from './MenuItem'
export function LeftMenu() {
+ const t = useTranslations('DocsMenu')
return (
- Overview
- Quick Start
- Installation
+ {t('overview')}
+ {t('quickStart')}
+ {t('installation')}
- Core Concepts
+ {t('coreConcepts')}
- Features
- Supported Syntax & Limitations
- Build Errors
+ {t('features')}
+ {t('limitations')}
+ {t('buildErrors')}
- Migration
+ {t('migration')}
- Figma and Theme Integration
+ {t('figmaAndThemeIntegration')}
@@ -144,31 +150,31 @@ export function LeftMenu() {
subMenu={[
{
to: '/docs/devup/devup-json',
- children: 'What is devup?',
+ children: t('whatIsDevup'),
},
{
to: '/docs/devup/colors',
- children: 'Colors',
+ children: t('colors'),
},
{
to: '/docs/devup/typography',
- children: 'Typography',
+ children: t('typography'),
},
{
to: '/docs/devup/length',
- children: 'Length',
+ children: t('length'),
},
{
to: '/docs/devup/shadow',
- children: 'Shadow',
+ children: t('shadow'),
},
{
to: '/docs/devup/breakpoints',
- children: 'Breakpoints',
+ children: t('breakpoints'),
},
{
to: '/docs/devup/figma-plugin',
- children: 'Figma Plugin',
+ children: t('figmaPlugin'),
},
]}
>
diff --git a/apps/landing/src/app/(detail)/docs/RightIndex.tsx b/apps/landing/src/app/(detail)/docs/RightIndex.tsx
index d129162ac..53c04045c 100644
--- a/apps/landing/src/app/(detail)/docs/RightIndex.tsx
+++ b/apps/landing/src/app/(detail)/docs/RightIndex.tsx
@@ -1,6 +1,6 @@
'use client'
import { Box, css, Flex, Text, VStack } from '@devup-ui/react'
-import { useLocale } from 'next-intl'
+import { useLocale, useTranslations } from 'next-intl'
import { useEffect, useState } from 'react'
import { Link, usePathname } from '@/i18n/navigation'
@@ -42,6 +42,7 @@ function IndexMenu({
export function RightIndex() {
const pathname = usePathname()
const locale = useLocale()
+ const t = useTranslations('RightIndex')
const isDocs = pathname.startsWith('/docs/')
const isComponents = pathname.startsWith('/components/')
const editUrl = isDocs
@@ -100,7 +101,7 @@ export function RightIndex() {
- Contents
+ {t('contents')}
{menus.map((menu) => (
@@ -130,7 +131,7 @@ export function RightIndex() {
textAlign="right"
typography="small"
>
- Edit this page
+ {t('editThisPage')}
) {
+ const t = useTranslations('Header')
return (
) {
border="none"
color="$text"
outline="none"
- placeholder="Search documentation..."
+ placeholder={t('searchPlaceholder')}
typography="caption"
w="100%"
{...props}
diff --git a/apps/landing/src/components/Header/MobMenu.tsx b/apps/landing/src/components/Header/MobMenu.tsx
index cfd9f6ed6..3f921524c 100644
--- a/apps/landing/src/components/Header/MobMenu.tsx
+++ b/apps/landing/src/components/Header/MobMenu.tsx
@@ -1,4 +1,6 @@
import { Box, css, Flex, Text } from '@devup-ui/react'
+import type { Locale } from 'next-intl'
+import { getTranslations } from 'next-intl/server'
import { Link } from '@/i18n/navigation'
@@ -8,7 +10,8 @@ import { HeaderInput } from './HeaderInput'
import { HeaderInputWrap } from './HeaderInputWrap'
import { MobMenuWrap } from './MobMenuWrap'
-export function MobMenu() {
+export async function MobMenu({ locale }: { locale: Locale }) {
+ const t = await getTranslations({ locale, namespace: 'Header' })
return (
@@ -25,7 +28,7 @@ export function MobMenu() {
>
- Docs
+ {t('docs')}
@@ -38,7 +41,7 @@ export function MobMenu() {
>
- Components
+ {t('components')}
@@ -51,7 +54,7 @@ export function MobMenu() {
>
- Team
+ {t('team')}
diff --git a/apps/landing/src/components/Header/MobMenuButton.tsx b/apps/landing/src/components/Header/MobMenuButton.tsx
index 8ca31c2a5..133269bda 100644
--- a/apps/landing/src/components/Header/MobMenuButton.tsx
+++ b/apps/landing/src/components/Header/MobMenuButton.tsx
@@ -2,6 +2,7 @@
import { css } from '@devup-ui/react'
import { useRouter } from 'next/navigation'
+import { useTranslations } from 'next-intl'
import { replaceQuery, useQueryParam } from '@/utils/use-query-param'
@@ -10,12 +11,13 @@ interface MobMenuButtonProps {
}
export function MobMenuButton({ children }: MobMenuButtonProps) {
+ const t = useTranslations('Header')
const { replace } = useRouter()
const menu = useQueryParam('menu') === '1'
return (
<>
@@ -110,7 +113,7 @@ export function Header() {
- Docs
+ {t('docs')}
@@ -132,7 +135,7 @@ export function Header() {
})}
href="/components/overview"
>
- Components
+ {t('components')}
@@ -142,7 +145,7 @@ export function Header() {
})}
href="/showcase"
>
- Showcase
+ {t('showcase')}
@@ -152,7 +155,7 @@ export function Header() {
})}
href="/team"
>
- Team
+ {t('team')}
@@ -199,7 +202,7 @@ export function Header() {
>
-
+
diff --git a/apps/landing/src/components/SearchModal/SearchContent.tsx b/apps/landing/src/components/SearchModal/SearchContent.tsx
index aafd3de64..ed2f97fc9 100644
--- a/apps/landing/src/components/SearchModal/SearchContent.tsx
+++ b/apps/landing/src/components/SearchModal/SearchContent.tsx
@@ -1,6 +1,6 @@
'use client'
import { Box, Center, css, Flex, Text, VStack } from '@devup-ui/react'
-import { useLocale } from 'next-intl'
+import { useLocale, useTranslations } from 'next-intl'
import { Fragment, useEffect, useState } from 'react'
import { Link } from '@/i18n/navigation'
@@ -47,6 +47,7 @@ function getHighlightedParts(text: string, query: string) {
export function SearchContent() {
const query = useQueryParam('query')
const locale = useLocale()
+ const t = useTranslations('Search')
const [data, setData] = useState()
useEffect(() => {
if (!query) return
@@ -131,13 +132,13 @@ export function SearchContent() {
textAlign="center"
typography="caption"
>
- No recent searches
+ {t('noResults')}
)}
>
) : (
- Loading...
+ {t('loading')}
)
return (
diff --git a/apps/landing/src/components/layout/SiteLayout.tsx b/apps/landing/src/components/layout/SiteLayout.tsx
index ceb0ab313..51358fad6 100644
--- a/apps/landing/src/components/layout/SiteLayout.tsx
+++ b/apps/landing/src/components/layout/SiteLayout.tsx
@@ -1,8 +1,8 @@
import { Box, css, globalCss, ThemeScript } from '@devup-ui/react'
import { resetCss } from '@devup-ui/reset-css'
import ReactLenis from 'lenis/react'
-import { NextIntlClientProvider } from 'next-intl'
-import { setRequestLocale } from 'next-intl/server'
+import { type Locale, NextIntlClientProvider } from 'next-intl'
+import { getMessages, setRequestLocale } from 'next-intl/server'
import { AnchorScroll } from '@/components/AnchorScroll'
import { Footer } from '@/components/Footer'
@@ -115,14 +115,15 @@ globalCss({
},
})
-export function SiteLayout({
+export async function SiteLayout({
children,
locale = 'en',
}: Readonly<{
children: React.ReactNode
- locale?: 'en' | 'ko'
+ locale?: Locale
}>) {
setRequestLocale(locale)
+ const messages = await getMessages({ locale })
return (
@@ -170,12 +171,12 @@ export function SiteLayout({
-
+
-
+
{children}
diff --git a/apps/landing/src/i18n/messages/en.json b/apps/landing/src/i18n/messages/en.json
new file mode 100644
index 000000000..26e664cb5
--- /dev/null
+++ b/apps/landing/src/i18n/messages/en.json
@@ -0,0 +1,57 @@
+{
+ "ComponentsMenu": {
+ "form": "Form",
+ "layout": "Layout",
+ "overview": "Overview",
+ "theme": "Theme"
+ },
+ "DocsMenu": {
+ "breakpoints": "Breakpoints",
+ "buildErrors": "Build Errors",
+ "colors": "Colors",
+ "coreConcepts": "Core Concepts",
+ "customShorthands": "Custom Shorthands",
+ "devupFigmaPlugin": "Devup Figma Plugin",
+ "devupJsonConfiguration": "devup.json Configuration",
+ "features": "Features",
+ "figmaAndThemeIntegration": "Figma and Theme Integration",
+ "figmaPlugin": "Figma Plugin",
+ "groupSelector": "Group Selector",
+ "installation": "Installation",
+ "length": "Length",
+ "limitations": "Supported Syntax & Limitations",
+ "migration": "Migration",
+ "migrationOverview": "Overview",
+ "nmBase": "N/M Base",
+ "noDependencies": "No Dependencies",
+ "optimizeCss": "Optimize CSS",
+ "overview": "Overview",
+ "quickStart": "Quick Start",
+ "selector": "Selector",
+ "shadow": "Shadow",
+ "styleProps": "Style Props",
+ "styleStorage": "Style Storage",
+ "typeInferenceSystem": "Type Inference System",
+ "typography": "Typography",
+ "whatIsDevup": "What is devup?",
+ "zeroRuntime": "Zero Runtime"
+ },
+ "Header": {
+ "components": "Components",
+ "docs": "Docs",
+ "menuButton": "Menu Button",
+ "primaryNavigation": "Primary navigation",
+ "searchPlaceholder": "Search documentation...",
+ "showcase": "Showcase",
+ "team": "Team",
+ "toggleTheme": "Toggle color theme"
+ },
+ "RightIndex": {
+ "contents": "Contents",
+ "editThisPage": "Edit this page"
+ },
+ "Search": {
+ "loading": "Loading...",
+ "noResults": "No recent searches"
+ }
+}
diff --git a/apps/landing/src/i18n/messages/ko.json b/apps/landing/src/i18n/messages/ko.json
new file mode 100644
index 000000000..a3cc9fc76
--- /dev/null
+++ b/apps/landing/src/i18n/messages/ko.json
@@ -0,0 +1,57 @@
+{
+ "ComponentsMenu": {
+ "form": "폼",
+ "layout": "레이아웃",
+ "overview": "개요",
+ "theme": "테마"
+ },
+ "DocsMenu": {
+ "breakpoints": "브레이크포인트",
+ "buildErrors": "빌드 오류",
+ "colors": "색상",
+ "coreConcepts": "핵심 개념",
+ "customShorthands": "사용자 정의 축약 속성",
+ "devupFigmaPlugin": "Devup Figma 플러그인",
+ "devupJsonConfiguration": "devup.json 설정",
+ "features": "기능",
+ "figmaAndThemeIntegration": "Figma 및 테마 연동",
+ "figmaPlugin": "Figma 플러그인",
+ "groupSelector": "그룹 선택자",
+ "installation": "설치",
+ "length": "길이",
+ "limitations": "지원 문법과 제한 사항",
+ "migration": "마이그레이션",
+ "migrationOverview": "개요",
+ "nmBase": "N/M 진법",
+ "noDependencies": "의존성 없음",
+ "optimizeCss": "CSS 최적화",
+ "overview": "개요",
+ "quickStart": "빠른 시작",
+ "selector": "선택자",
+ "shadow": "그림자",
+ "styleProps": "스타일 속성",
+ "styleStorage": "스타일 저장소",
+ "typeInferenceSystem": "타입 추론 시스템",
+ "typography": "타이포그래피",
+ "whatIsDevup": "devup이란?",
+ "zeroRuntime": "제로 런타임"
+ },
+ "Header": {
+ "components": "컴포넌트",
+ "docs": "문서",
+ "menuButton": "메뉴 버튼",
+ "primaryNavigation": "주요 메뉴",
+ "searchPlaceholder": "문서 검색...",
+ "showcase": "쇼케이스",
+ "team": "팀",
+ "toggleTheme": "색상 테마 전환"
+ },
+ "RightIndex": {
+ "contents": "목차",
+ "editThisPage": "이 페이지 편집"
+ },
+ "Search": {
+ "loading": "불러오는 중...",
+ "noResults": "검색 결과가 없습니다"
+ }
+}
diff --git a/apps/landing/src/i18n/next-intl.d.ts b/apps/landing/src/i18n/next-intl.d.ts
new file mode 100644
index 000000000..7ada231f9
--- /dev/null
+++ b/apps/landing/src/i18n/next-intl.d.ts
@@ -0,0 +1,8 @@
+import type en from './messages/en.json'
+
+declare module 'next-intl' {
+ interface AppConfig {
+ Locale: 'en' | 'ko'
+ Messages: typeof en
+ }
+}
diff --git a/apps/landing/src/i18n/request.ts b/apps/landing/src/i18n/request.ts
index 42d075287..7052eeb6c 100644
--- a/apps/landing/src/i18n/request.ts
+++ b/apps/landing/src/i18n/request.ts
@@ -1,6 +1,32 @@
import { getRequestConfig } from 'next-intl/server'
-export default getRequestConfig(async ({ requestLocale }) => ({
- locale: (await requestLocale) ?? 'en',
- timeZone: 'UTC',
-}))
+import en from './messages/en.json'
+import ko from './messages/ko.json'
+
+type Messages = typeof en
+type MessageOverrides = {
+ [Namespace in keyof Messages]?: Partial
+}
+
+const koreanOverrides: MessageOverrides = ko
+
+/** English supplies every key; Korean replaces the keys it translates. */
+function mergeMessages(overrides: MessageOverrides): Messages {
+ return Object.fromEntries(
+ Object.entries(en).map(([namespace, messages]) => [
+ namespace,
+ { ...messages, ...overrides[namespace as keyof Messages] },
+ ]),
+ ) as Messages
+}
+
+const koreanMessages = mergeMessages(koreanOverrides)
+
+export default getRequestConfig(async ({ requestLocale }) => {
+ const locale = (await requestLocale) === 'ko' ? 'ko' : 'en'
+ return {
+ locale,
+ messages: locale === 'ko' ? koreanMessages : en,
+ timeZone: 'UTC',
+ }
+})
diff --git a/e2e/landing-dev.spec.ts b/e2e/landing-dev.spec.ts
index 383a32484..f5a00604a 100644
--- a/e2e/landing-dev.spec.ts
+++ b/e2e/landing-dev.spec.ts
@@ -78,7 +78,9 @@ for (const [route, target] of routes) {
await expect(
page.locator('vite-error-overlay, nextjs-portal [data-nextjs-dialog]'),
).toHaveCount(0)
- const theme = page.getByRole('button', { name: 'Toggle color theme' })
+ const theme = page.getByRole('button', {
+ name: target.startsWith('/ko') ? '색상 테마 전환' : 'Toggle color theme',
+ })
const initialTheme = await page.locator('html').getAttribute('data-theme')
await theme.click()
await expect(page.locator('html')).toHaveAttribute(
@@ -143,7 +145,10 @@ for (const locale of ['en', 'ko'] as const) {
await page.goto(`${prefix}/docs/overview`, { waitUntil: 'networkidle' })
await page
- .getByRole('link', { name: 'Features', exact: true })
+ .getByRole('link', {
+ name: locale === 'ko' ? '기능' : 'Features',
+ exact: true,
+ })
.first()
.click()
await expect(page).toHaveURL(/(?