2
2

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 5 years have passed since last update.

Ext JS 4.2.1 でのロケールの設定

Last updated at Posted at 2014-04-11

ロケールのあて方を書いた日本語サイトがないようなので、書いておきます。
Ext JS の 4.2 以降では locale パッケージが用意されました。
以前のように、 index.html でロケールファイルを読む必要はありません。
日本語のロケールパッケージを宛てるには次の様にします。

app.json
"requires": [
    "ext-locale"
],
"locale": "ja",

requires の中に ext-locale を追加して、
locale に ja を指定します。

Sencha Cmd でプロジェクトをリフレッシュします。

$ sencha app refresh

これで、各所の英語が日本語になります。

以前は sencha.cfg に app.locale=ja と設定すると、書いていましたが、
app.json に両方書けるとわかりましたので、書き換えました。

2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?