Foundation > 国際化 > Rogue Wave Views のローカライズ・メッセージ・データベース > メッセージ・データベース・ファイルのパラメーターを決定する
 
メッセージ・データベース・ファイルのパラメーターを決定する
以下のプログラムを実行して、現在の Rogue Wave® Views 表示言語と Rogue Wave Views がメッセージ・データベース・ファイルを検索するパス名を決定できます。
パス名を表示するためには、ILVVERBOSEFINDPATH 環境変数 (または verboseFindInPath リソース) を true に設定します。ILVPATH 環境変数を変更して、その結果表示されるパス名を確認します。
#include <ilviews/ilv.h>
#include <ilviews/base/message.h>
#include <ilog/pathlist.h>
 
int main(int argc, char* argv[])
{
if (!IlvSetLocale()) {
exit(1);
}
 
IlvDisplay* display = new IlvDisplay(“CheckLocalizedDbm”, 0, argc, argv);
 
IlvPrint(“Current Views display language: %s\n”,
display->getCurrentLanguage()->name());
 
const char* path = display->getPath();
 
IlPathList plist(path? path : “./”);
IlvPrint(“Current path: %s\n”, plist.getString().getValue());
 
display->getDatabase()->read(“my-file.dbm”, display);
 
return 0;
}
たとえば、LANG=fr_FR.iso88591 に設定されている HP-UX システムまたは LANG=fr に設定されている Solaris システムでこのプログラムを実行すると、次のような結果になります。
IlvPathList::findInPath file ilviews/locale/fr_FR.ISO-8859-1/views.dbm not in ./.
IlvPathList::findInPath found:<$ILVHOME>/data/ilviews/locale/fr_FR.ISO-8859-1/views.dbm.
Current Views display language:fr_FR
 
Current path: ./
 
IlvPathList::findInPath file locale/fr_FR.ISO-8859-1/my-file.dbm not in ./.
IlvPathList::findInPath file locale/fr_FR.ISO-8859-1/my-file.dbm not in <$ILVHOME>/data/.
IlvPathList::findInPath file locale/fr_FR.ISO-8859-1/my-file.dbm not in <$ILVHOME>/data/icon/.
IlvPathList::findInPath file locale/fr_FR.ISO-8859-1/my-file.dbm not in <$ILVHOME>/data/images/.
IlvDisplay::findInPath Couldn?t find ?locale/fr_FR.ISO-8859-1/my-file.dbm?
IlvPathList::findInPath file my-file.dbm not in ./.
IlvPathList::findInPath file my-file.dbm not in <$ILVHOME>/data/.
IlvPathList::findInPath file my-file.dbm not in <$ILVHOME>/data/icon/.
IlvPathList::findInPath file my-file.dbm not in <$ILVHOME>/data/images/.
IlvDisplay::findInPath Couldn?t find ?my-file.dbm?
 

Version 6.0
Copyright © 2015, Rogue Wave Software, Inc. All Rights Reserved.