7. SAP UI5 Multilingual Application (다국어 적용)

SAP UI5 Multilingual Application (다국어 적용)
이번 단계에서는 ResourceModel을 활용하여 Application에 다국어를 적용하는 방법에 대해서 살펴본다.
(In this step, we will look at how to apply multilingualism to applications using ResourceModel.)
실행결과(Results of this step)
브라우저의 언어가 한국어인 경우를 가정하여 i18n 파일을 활용하여 한국어가 적용된 application을 만든다.
(Assuming that the browser's language is Korean, use the i18n file to create an application to which Korean is applied.)
(Assuming that the browser's language is Korean, use the i18n file to create an application to which Korean is applied.)

실행 순서(Order of execution of this step):
- i18n_ko.properties 파일 생성하여 한국어 등록한다.
(Create the "i18n_ko.properties" file and register in Korean.) - manifest.json 파일에 한국어 정보를 추가한다.
(Add Korean information to the "manifest.json" file.)
1. i18n_ko.properties 파일 생성하여 한국어 등록한다.
(Create the "i18n_ko.properties" file and register in Korean.)
- webapp/i18n/i18n_ko.properties 파일을 신규 생성한 후 한국어 번역 정보를 추가한다.
(Add Korean translation information after creating a new "webapp/i18n/i18n_ko.properties" file.) - 한국어 외에 다른 언어를 추가할 때에는 로케일 접미사가 붙은 별도의 i18n 파일을 적용하면 된다. (예: i18n_de.properties - 독일어, i18n_en.properties - 영어 등)
(When adding languages, you can apply a separate "i18n" file with the locale suffix (e.g. i18n_de.properties - German, i18n_en.properties - English, etc.))

1 2 3 4 5 6 7 8 | # App Descriptor appTitle=UI5 실습 appDescription=실무자를 위한 UI5 교육 & 실습 # Hello Panel showHelloButtonText=안녕 helloMsg=안녕 {0} |
2. manifest.json 파일에 한국어 정보를 추가한다.
(Add Korean information to the "manifest.json" file.)
- 등록되어 있는 ResourceModel에 한국어 코드인 "ko"를 추가한다.
(Add the Korean code "ko" to the registered ResourceModel.) - 참고: 언어의 코드는 브라우저의 언어 코드에 맞춰서 설정해야 한다.
예: 영어는 en, 독일어는 de, 중국어는 zh 코드를 사용한다.
(Note: The code of the language should be set to the language code of the browser.
For example: "en" for English, "de" for German, and "zh" for Chinese.)
1 2 3 4 5 6 7 8 9 10 11 | "models": { "i18n": { "type": "sap.ui.model.resource.ResourceModel", "settings": { "bundleName": "ui5_tutorial.i18n.i18n", "supportedLocales": ["","ko"], "fallbackLocale": "" } } } |
댓글
댓글 쓰기