iCAx开思工具箱

标题: 請問UF_TEXT_load_translation_file如何使用 [打印本页]

作者: ggyybon    时间: 2010-10-4 09:11
标题: 請問UF_TEXT_load_translation_file如何使用
各位先進:

       小弟最近在做NX二次開發多國語系的支援,
想透過UF_TEXT_load_translation_file()來添加一個.lng檔案,
我使用方法如下:

1.Define UGII_USR_DIR environment variable

2.Put all of your new strings and translation into txt files, ugii_japanese.txt,
     following is the format:



作者: cam-yp    时间: 2010-10-6 21:39
This is the complete path to the file to be loaded. When
NX displays the user interface, it will use the
contents of this file to try and translate strings into
the users language.

Translation strings that exist in the NX language
file found in $UGII_LANGUAGE/ugii.lng will always be used
first. If a translation is not found in that file, then
this file will be searched.

值得注意的是:在制作LNG文件时,要设置相对的语言格式,简体中文simpl_chinese,繁体中文trad_chinese

NX会自动查找NX自带LNG文件,当找不到时,才会在用户自定义LNG文件中查找
作者: ggyybon    时间: 2010-10-8 16:31
我在製作LNG文件時也都有設置相對的語言格式,但在呼叫UI Styler時上面的顯示文字依然沒變更我載入載入.lng檔案的dll寫法如下:
extern DllExport void ufsta( char *param, int *returnCode, int rlen )
{   
    if( UF_CALL(UF_initialize()) )
    {        
        return;
    }
   
    UF_TEXT_load_translation_file("C:\\tranText\\startup\\aaa.lng")
   
    UF_CALL(UF_terminate());
}


Plug-in如附件,可否請前輩幫我看看哪邊出了差錯






欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3