0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

多言語対応

Posted at

多言語対応を試しました

まずはScreen上にJapanese、Englishのボタンを配置
image.png

Dataタブ - Multilingual Localesを右クリックし、Add Locale...
image.png
jpを入力して、JapaneseをSelect
image.png
engで検索し、Trancelation in ja-JPに英語を入力
(これは最初にScreen上に配置したボタン上に書いたEnglishという文字列をja-JPの時は英語にしますよということです。)
image.png
japanで検索し、Trancelation in ja-JPに日本語を入力したらDoneを押します。
(同じく最初にScreen上に配置したボタン上に書いたJapaneseという文字列をja-JPの時は日本語にしますよということです。)
image.png
LogicタブにSetCurrentLocalというClient Actionが作成されています。
image.png
JapaneseボタンのClient ActionにRun Client Actionを配置し、
ActionをSetCurrentLocale、Localeを"ja-JP"にします。
image.png
EnglishボタンのClient ActionにRun Client Actionを配置し、
ActionをSetCurrentLocale、Localeを"en-US"にします。
image.png

完成です。

Publishして、Open in blowserしてください。

Japaneseを押すと、日本語に変わり、
image.png
英語を押すと、英語に戻ります
image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?