on 08-01-2012 8:32 AM
hello expert
i want make my sap b1 add on for multipal language supporting
how i can do that as like sap1
Hi,
in C# iam working with "Resources" to manage multilanguage - from there iam reading the value and when loading the Form i "paint" the StaticText.Caption.
lg David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
iam using my own .dll to load data (images and text).
i can give you a code snippet - maybe its helpful for other people too.
Sample of Loading Text from .DLL Resource:
private string LoadStringDLL(string sString)
{
string sReturn = "";
System.Reflection.Assembly Assembly = null;
System.Resources.ResourceManager ResManager = null;
try
{
Assembly = System.Reflection.Assembly.LoadFile(System.Windows.Forms.Application.StartupPath + "\\AddOn_Data.dll");
ResManager = new System.Resources.ResourceManager("Data.Data", Assembly);
sReturn = ResManager.GetString(sString);
}
catch
{
}
finally
{
ResManager = null;
Assembly = null;
GC.Collect();
}
return sReturn;
}
You can use this sample this way:
((SAPbouiCOM.StaticText)oForm.Items.Item(i).Specific).Caption = LoadStringDLL("FormUID_ItemUID_LanguageCode");
this is just a sample to Load the Key "FormUID_ItemUID_LanguageCode" from a .DLL with Text Resource.
iam using it in a better way with different code - i just wanted to share my experience with a small sample.
You can also load the data from the database - but using a resource file is more efficient.
have a nice day.
lg David
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.