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!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...