Splunk Dev

日本語リソースの位置は?(Appのマルチランゲージ対応の方法)

kuehara
Explorer

ナビゲーションメニューの標準のものは自動で翻訳され表示されます。

例:)
Search ⇔ サーチ

独自に作成したメニューに関しても同様な動作にしたいと考えております。
予想としては、どこかに日本語リソースがあるものと考えられますが、
どこにあるのでしょうか。
また、独自のリソースを作成して配置することは可能なのでしょうか。

1 Solution

melonman
Motivator

ローカライズされているAppとして、Getting Startedがありますが、
そのAppのディレクトリ配下は以下のようになっているようです。
* 一部ディレクトリ・ファイル情報は削っています。

$ tree
.
├── appserver
│   └── static
│       └── index-ja_JP.html
├── default
│   ├── app.conf
│   └── data
│       └── ui
│           ├── nav
│           │   └── default.xml
│           └── views
│               └── getstarted.xml
├── locale
│   ├── ja-JP
│   │   └── LC_MESSAGES
│   │       ├── messages.mo
│   │       └── messages.po
│   └── messages.pot
└── metadata
    └── default.meta

独自のAPPを開発して、UIのローカライズをすることも可能だとおもいます。

参考までに、以下のコマンドで、特定APPのストリングを抽出することが可能です。

$ ./splunk help extract


  Extract translatable strings from an application, ready to be translated with a 
  gettext compatible editor.

  Creates or replaces locale/messages.pot in the application's directory.

  Syntax:

    extract i18n -app <application name>

  Documentation on creating i18n compliant applications is available online at
  http://docs.splunk.com/Documentation

View solution in original post

0 Karma

melonman
Motivator

After retag, the original Question has been deleted. I will put his question here again.

ナビゲーションメニューの標準のものは自動で翻訳され表示されます。

例:) Search ⇔ サーチ

独自に作成したメニューに関しても同様な動作にしたいと考えております。予想としては、どこかに日本語リソースがあるものと考えられますが、どこにあるのでしょうか。また、独自のリソースを作成して配置することは可能なのでしょうか。

0 Karma

kuehara
Explorer

回答ありがとうございました。

sppserver/static/index.htmlを英語で作成
必要部分を日本語化したindex-ja_JP.htmlを同じディレクトリに配置。
これで、日本語と英語の切り替えができました。

引き続きconfファイル内に定義されたメッセージ(Appの説明文など)の切り替えにチャレンジしてみます。

0 Karma

melonman
Motivator

国際化されたAPPを作成されているようであれば、ぜひSplunkbaseに登録してください。

Please upload your internationalized app to splunkbase!

0 Karma

melonman
Motivator

ローカライズされているAppとして、Getting Startedがありますが、
そのAppのディレクトリ配下は以下のようになっているようです。
* 一部ディレクトリ・ファイル情報は削っています。

$ tree
.
├── appserver
│   └── static
│       └── index-ja_JP.html
├── default
│   ├── app.conf
│   └── data
│       └── ui
│           ├── nav
│           │   └── default.xml
│           └── views
│               └── getstarted.xml
├── locale
│   ├── ja-JP
│   │   └── LC_MESSAGES
│   │       ├── messages.mo
│   │       └── messages.po
│   └── messages.pot
└── metadata
    └── default.meta

独自のAPPを開発して、UIのローカライズをすることも可能だとおもいます。

参考までに、以下のコマンドで、特定APPのストリングを抽出することが可能です。

$ ./splunk help extract


  Extract translatable strings from an application, ready to be translated with a 
  gettext compatible editor.

  Creates or replaces locale/messages.pot in the application's directory.

  Syntax:

    extract i18n -app <application name>

  Documentation on creating i18n compliant applications is available online at
  http://docs.splunk.com/Documentation
0 Karma

ChrisG
Splunk Employee
Splunk Employee
0 Karma

melonman
Motivator

(Translation Summary)

How do I localize the apps' UI?
Where is the location of resource files?
Is it possible to create and put localization resources?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...