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
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...