forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Multi Lingual

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Thu Oct 03, 2002 9:09 am    Post subject: Multi Lingual Reply with quote

Hi,

I tried to make my new program multilingual with Language-Ini-Files.

This works really fine for any dialog elements (eg. buttons, because buttons create a internalnameBUTTON event).
But what can I do with menu elements ?
The Menu generates a DisplayedNameMENU event.
I thought about making a special wait event.
if @equal(@substr(@eventblabla,.... MENU).
But how could I translate the MenuName back to my language
to find the right label in my code ?

Or does somebody have a better idea how to make a programm
multilingual ?

Thank you very much,

Bye, Fabian
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Thu Oct 03, 2002 9:22 am    Post subject: Reply with quote

Use variables like this:

Code:

rem You must use @INIREAD() to get the value of the variables...
%%file = Bestand
%%filenew = Nieuw
%%fileopen = Openen
%%filesave = Opslaan

dialog create,New,0,0,200,200
dialog add,menu,%%file,%%filenew,%%fileopen,%%filesave
dialog show

:Evloop
wait event
%%event = @event()

rem This checks for the event named %%filenew (in this case Nieuw) MENU
rem So if %%event = NieuwMENU the script gose to Filenewmenu...
  if @equal(%%event,%%filenew"MENU")
    goto Filenewmenu
    end
  if @equal(%%event,%%fileopen"MENU")
    goto Fileopenmenu
    end
  if @equal(%%event,%%filesave"MENU")
    goto Filesavemenu
    end
   
rem If the event isn't a MENU, go to it.
goto %%event

:Filenewmenu
info %%filenew = New
goto evloop

:Fileopenmenu
info %%fileopen = Open
goto evloop

:Filesavemenu
info %%filesave = Save
goto evloop

:Close
exit
Back to top
View user's profile Send private message
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Thu Oct 03, 2002 10:00 am    Post subject: Multi Lingual Reply with quote

Hi,

thanks - very good idea Wink

Bye, Fabian
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group