For instant language switching I found a better solution:

System.Language=...
FMain.Delete()
FMain.Raise()
This works fine.


Still, even if I've updated it to version 2.11, which is the most recent
version for Mandriva,
I can't use this in the .rpm package. The installed version doesn't know
what to do.

The code, which works at testing but not as installed from an .rpm :

PUBLIC SUB FirstRun()
DIM trans AS String[]
DIM i AS Integer
DIM x AS String
trans = Dir(".lang")
FOR i = 0 TO trans.Length - 1
IF ((Len(trans[i]) = 5) AND (InStr(trans[i], ".mo") = 0)) THEN  // *I need
to clean the list from other files contained in the .lang folder*
x = Mid$(trans[i], 1, 2)
langBox.Add(x)
ENDIF
NEXT

END


PUBLIC SUB langBox_Click()
DIM ezt AS String
DIM what AS Integer
ezt = langBox.Current.Text
what = Message.Question("Do you really want to switch the language to " &
Chr$(34) & ezt & Chr$(34) & " ?", "Yes", "No")
IF what = 1 THEN

System.Language = ezt & "_" & Upper$(ezt)
FMain.Delete()
FMain.Raise()
ENDIF
END

I don't know why. maybe there aren't .lang folder in compiled package?
Csaba
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to