← 목록으로
2026-02-28guides

ai-architect-global — i18n + 결제 인프라 가이드

작성: 2026-02-28 자비스 프로젝트: projects/ai-architect-global/


1. i18n 구조

지원 언어

코드언어기본
enEnglish✅ (defaultLocale)
ko한국어
ja日本語

URL 구조

/ → /en/ (redirect, 기본 locale)
/ko/ → 한국어
/ja/ → 일본어
/blog/[slug] → /en/blog/[slug]

핵심 파일

src/
  i18n/
    routing.ts         ← locales 설정
    request.ts         ← locale 요청 핸들러
  messages/
    en.json            ← 영문 메시지
    ko.json            ← 한국어 메시지
    ja.json            ← 일본어 메시지
  app/
    [locale]/          ← 모든 페이지 locale 라우팅
      layout.tsx       ← hreflang SEO 메타태그 포함
middleware.ts          ← next-intl 미들웨어

2. 메시지 사용법

// 서버 컴포넌트
import { getTranslations } from 'next-intl/server';

export default async function Page() {
  const t = await getTranslations('nav');
  return <nav>{t('home')}</nav>;
}

// 클라이언트 컴포넌트
'use client';
import { useTranslations } from 'next-intl';

export function NavMenu() {
  const t = useTranslations('nav');
  return <a href="/">{t('home')}</a>;
}

메시지 구조 (en.json)

{
  "nav": { "home", "products", "bundle", "blog", "about" },
  "hero": { "title", "subtitle", "cta" },
  "common": { "buyNow", "learnMore", "price" },
  "footer": { "rights" },
  "blog": { "title", "readMore", "publishedOn", "minRead" },
  "about": { "title", "subtitle" },
  "bundle": { "title", "saveText", "getBundle" },
  "products": { "title", "buyGuide", "backToProducts" }
}

3. 새 언어 추가 방법

  1. src/messages/{lang}.json 생성
  2. src/i18n/routing.ts에 locale 추가:
    export const routing = defineRouting({
      locales: ['en', 'ko', 'ja', 'zh'], // 신규 추가
      defaultLocale: 'en'
    });
    
  3. src/app/[locale]/layout.tsx hreflang 업데이트

4. 결제 추상화 레이어

파일: src/lib/payment.ts

import { getPaymentConfig, getCheckoutUrl } from '@/lib/payment';

// locale별 결제 설정 조회
const config = getPaymentConfig('ko');
// { provider: 'lemon-squeezy', locale: 'ko', currency: 'KRW' }

// 결제 URL 생성
const url = getCheckoutUrl('pdf-russell-brunson', config);

locale별 결제 매핑

localeprovidercurrency
enlemon-squeezyUSD
kolemon-squeezyKRW
jalemon-squeezyJPY
기타lemon-squeezyUSD

CEO 블로킹 현황

  • Lemon Squeezy 결제 URL 7개 미설정 → 환경변수로 관리
  • 환경변수 패턴: LS_URL_{PRODUCT_ID} (예: LS_URL_RUSSELL_BRUNSON)
  • CEO가 LS 계정에서 각 상품 결제 링크 생성 후 Vercel 환경변수 설정 필요

5. SEO — hreflang 설정

src/app/[locale]/layout.tsx에서 자동 생성:

<link rel="alternate" hreflang="en" href="https://ai-architect.io/en/..." />
<link rel="alternate" hreflang="ko" href="https://ai-architect.io/ko/..." />
<link rel="alternate" hreflang="ja" href="https://ai-architect.io/ja/..." />
<link rel="alternate" hreflang="x-default" href="https://ai-architect.io/en/..." />

6. 빌드 현황

  • 52페이지 정적 생성 (3 locale × 전체 페이지)
  • Vercel: prj_FHoCFiCLPu44j9iCB5utzkhMTF1E
  • 도메인: ai-architect.io (미연결, CEO 액션 필요)
guides/2026/02/28/ai-architect-global-i18n-guide.md