OPEN_GRID API - v1.5.2
    Preparing search index...

    Type Alias MessageValue

    MessageValue: string | ((params: MessageParams) => string)

    메시지 값: 평문 문자열('{name}' 보간) 또는 함수(복수형·조사 등 "문법이 데이터인" 케이스의 탈출구). 왜 함수까지 허용하나: "사과 1개/사과 2개"처럼 복수형 규칙이 언어마다 다른데, ICU/CLDR 같은 범용 복수형 엔진을 넣으면 zero-dependency 원칙이 깨진다. 그래서 그 규칙 자체를 로케일 파일 안의 함수로 옮겨, 각 언어가 자기 문법을 직접 결정하게 한다.

    A message value: a plain string ('{name}' interpolation) or a function (escape hatch for plurals/particles where "grammar is data"). Why allow a function at all: plural rules differ per language, and pulling in a general ICU/CLDR plural engine would break the zero-dependency principle — so the rule itself moves into a function inside the locale file, letting each language own its own grammar.

    メッセージ値: プレーン文字列('{name}' 補間)または関数(複数形・助詞など「文法がデータである」 ケースの逃げ道)。なぜ関数まで許すのか: 「りんご1個/りんご2個」のように複数形の規則は言語ごとに 異なりますが、ICU/CLDR のような汎用の複数形エンジンを入れると zero-dependency の原則が崩れます。 そこでその規則自体をロケールファイル内の関数に移し、各言語が自分の文法を直接決められるようにします。

    消息值: 纯字符串('{name}' 插值)或函数(复数、助词等「语法即数据」场景的逃生口)。为什么连函数 也允许: 像「苹果1个/苹果2个」这样,复数规则因语言而异,但引入 ICU/CLDR 这类通用复数引擎会破坏 zero-dependency 原则。于是把规则本身移入区域设置文件里的函数,让每种语言直接决定自己的语法。

    const countBadge: MessageValue = (p) => `${p.n}건`; // Korean has no plural form