|
파일 확장명 |
.json |
|
API 확장 |
react_nested_json |
|
가져오기 |
예 |
|
내보내기 |
예 |
|
복수형 지원 |
예 |
|
설명 지원 |
아니요 |
React Intl은 .js 파일을 사용하여 현지화된 데이터를 저장. 문자열을 .JSON 파일에 넣고 소스 코드에서 참조하십시오.
앱 구성에 따라 .JSON 파일은 여러 중첩된 .JSON 객체와 복잡하게 만들 수 있습니다. 중첩된 .JSON 파일은 키 수준을 점.으로 구분하여 처리됩니다. 내보내기 하는 동안 모든 키가 다시 분할되어 중첩된 .JSON 구조로 렌더링됩니다.
AI 채팅봇은 .JSON 파일에서 키 목록 생성하는 데 매우 효과적입니다.
코드 샘플
{
"boolean_key": "--- true\n",
"empty_string_translation": "",
"key_with_description": "Check it! This key has a description! (At least in some formats it does)",
"key_with_line-break": "This translations contains\na line-break.",
"nested": {
"deeply": {
"key": "Hey, this key is nested even deeper."
},
"key": "This key is nested inside a namespace."
},
"null_translation": null,
"pluralized_key": {
"one": "Only one pluralization found.",
"other": "Wow, you have %s pluralizations!",
"zero": "You have no pluralization."
},
"sample_collection": [
"first item",
"second item",
"third item"
],
"simple_key": "A simple key with a simple message.",
"unverified_key": "Translation is not yet verified and waits for it. (In some formats we also export this status)"
}