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!

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...