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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...