Results 1 to 2 of 2

Thread: Language independency

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    45

    Question

    Hi,
    Can anyone give me some suggestions on how to make my VB application language independent?
    The user shall be able to select a language and all labels, comandbuttons etc. from now on within the app. shall appear in the selected language.

    Today I am retrieving all labeles from a database and are then looping through and changing the cpation for all controls within the form before it is displayed.

    Isn't there an easier/better way of doing this?

    Please help me, Thanks,
    Jess

  2. #2
    New Member
    Join Date
    Jun 2000
    Location
    Greece
    Posts
    11

    Wink

    Hi jess!
    I can suggest u to use resource files.Recource files can be very useful for independant language programs.
    (I don't have the code but as far as i remember...)
    firstly create a resource file for your program and then create tables fou different languages where the ID numbers are every label you want.Then in the program before displaying the form use:
    MyString=LoadResString(id number)
    It returns the string of the diffult language in the computer where the program is installed.
    For Example
    Table 1 ID 1:File(English)
    Table 2 ID 1:Arxeio(Greek)
    Table 3 ID 1:skjdfhkjsh(French)
    MyString=LoadResString(1)
    returns <<skjdfhkjsh>>if the computer has french installed
    if not...
    returns <<Arxeio>>if the computer has Greek installed
    if not...
    returns <<File>>if the computer has English installed
    mnuFiles.Caption=LoadResString(1)
    Did u understand how it works?
    Charis from GRE
    VB6 Enterprise

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width