Created
August 10, 2014 15:04
-
-
Save mitsuruog/2d212e729f45542717f8 to your computer and use it in GitHub Desktop.
[SAPUI5/OpenUI5]スマートに国際化する方法のBlogコードサンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sap.ui.controller "com.mitsuruog.sapui5.showroom.view.Locale", | |
onInit: -> | |
i18nModel = new sap.ui.model.resource.ResourceModel | |
bundleUrl : "i18n/messageBundle.properties" | |
@getView().setModel i18nModel, "i18n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sap.ui.jsview "com.mitsuruog.sapui5.showroom.view.Locale", | |
getControllerName: -> "com.mitsuruog.sapui5.showroom.view.Locale" | |
createContent: (oController) -> | |
@page = new sap.m.Page | |
title: "{i18n>title}" | |
subHeader: | |
new sap.m.Bar | |
contentRight: [ | |
new sap.m.Text | |
text: "{i18n>changeLocale}" | |
] | |
content: [ | |
new sap.m.Text | |
text: "{i18n>text}" | |
] | |
footer: | |
new sap.m.Bar | |
contentRight: [ | |
new sap.m.Button | |
type: "Accept" | |
text: "{i18n>button}" | |
] | |
@page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title = ロケール | |
text = 吾輩は猫である。名前はまだ無い。 | |
changeLocale = ロケール変更: | |
button = これはボタンのテキスト |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment