cancel
Showing results for 
Search instead for 
Did you mean: 

convert the sap b1 addon in multipal lounges

Former Member
0 Kudos

hello expert

  i want make my sap b1 add on for multipal language supporting

how i can do that as like sap1

Accepted Solutions (0)

Answers (1)

Answers (1)

Nussi
Active Contributor
0 Kudos

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.

ResourceManager.GetString Method (String) (System.Resources)

lg David

Former Member
0 Kudos

hello friend

  can you tell me how we can convert each and  every word of add on screen can be converted into language of sap b1.please give sample code if you have

Nussi
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi,

i am designing and add_on in sap b1.

what i need when i start my add_on it should check language in sap and on the bases of that my add_on language should get changed.

i found lrf file in sap b1.

how should i used  that lrf file to change language.

Nussi
Active Contributor
0 Kudos

Hi,

the current sap business one language is stored in

oCompany.language

you can't edit the SAP .lrf - thats why i gave you the sample how to make your own resource file.

lg David