Currently, you should set the language when starting the iink SDK, just after engine creation. Please refer to the below example. Also, please make sure you properly deployed the "zh_CN" language package.
// Folders "conf" and "resources" are currently parts of the layout // (for each conf/res file of the project => properties => "Build Action = content") string[] confDirs = new string[1]; confDirs[0] = "conf"; _engine.Configuration.SetStringArray("configuration-manager.search-path", confDirs);
var localFolder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); var tempFolder = Path.Combine(localFolder, "MyScript", "tmp"); _engine.Configuration.SetString("content-package.temp-folder", tempFolder); _engine.Configuration.SetString("lang", "zh_CN");
Currently, you should set the language when starting the iink SDK, just after engine creation. Please refer to the below example. Also, please make sure you properly deployed the "zh_CN" language package.
// Folders "conf" and "resources" are currently parts of the layout // (for each conf/res file of the project => properties => "Build Action = content") string[] confDirs = new string[1]; confDirs[0] = "conf"; _engine.Configuration.SetStringArray("configuration-manager.search-path", confDirs);
var localFolder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); var tempFolder = Path.Combine(localFolder, "MyScript", "tmp"); _engine.Configuration.SetString("content-package.temp-folder", tempFolder); _engine.Configuration.SetString("lang", "zh_CN");
X
XiangJue XiangJue
said
over 2 years ago
I'll do as you say,But ,Why do I still recognize English after setting Chinese??? Are you answering JAVA code?
XiangJue XiangJue
例如:conf .setString(“lang”,“en_US”); change :: “conf .setString(”lang“,”zh_CN“);以及如何切换部分;例如:: conf .setString(”text.configuration.name“,”text“);更改::“”conf .setString(“text.configuration.name”,“text”);
在初始化之后,我试图将语言从英语切换到Chiese,所以我有另一个初始化。然后它报告:Log:包已经打开。如何切换语言?
Dear XiangJue,
thank you for your question.
Currently, you should set the language when starting the iink SDK, just after engine creation. Please refer to the below example. Also, please make sure you properly deployed the "zh_CN" language package.
Best regards,
Olivier
try
{
// Initialize Interactive Ink runtime environment
_engine = Engine.Create(MyScript.Certificate.MyCertificate.Bytes);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Error", MessageBoxButton.OK, MessageBoxImage.Error);
Close();
return;
}
// Folders "conf" and "resources" are currently parts of the layout
// (for each conf/res file of the project => properties => "Build Action = content")
string[] confDirs = new string[1];
confDirs[0] = "conf";
_engine.Configuration.SetStringArray("configuration-manager.search-path", confDirs);
var localFolder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
var tempFolder = Path.Combine(localFolder, "MyScript", "tmp");
_engine.Configuration.SetString("content-package.temp-folder", tempFolder);
_engine.Configuration.SetString("lang", "zh_CN");
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstOlivier @MyScript
Dear XiangJue,
thank you for your question.
Currently, you should set the language when starting the iink SDK, just after engine creation. Please refer to the below example. Also, please make sure you properly deployed the "zh_CN" language package.
Best regards,
Olivier
try
{
// Initialize Interactive Ink runtime environment
_engine = Engine.Create(MyScript.Certificate.MyCertificate.Bytes);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Error", MessageBoxButton.OK, MessageBoxImage.Error);
Close();
return;
}
// Folders "conf" and "resources" are currently parts of the layout
// (for each conf/res file of the project => properties => "Build Action = content")
string[] confDirs = new string[1];
confDirs[0] = "conf";
_engine.Configuration.SetStringArray("configuration-manager.search-path", confDirs);
var localFolder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
var tempFolder = Path.Combine(localFolder, "MyScript", "tmp");
_engine.Configuration.SetString("content-package.temp-folder", tempFolder);
_engine.Configuration.SetString("lang", "zh_CN");
XiangJue XiangJue
I'll do as you say,But ,Why do I still recognize English after setting Chinese??? Are you answering JAVA code?
Olivier @MyScript
Dear XiangJue,
can you confirm you installed the corresponding Simplfied Chinese assets available for download: https://developer.myscript.com/support/recognition-assets
If so, can you please check your logs, as you should have an error message.
Best regards,
Olivier