[Gambas-user] Language

Charlie Reinl Karl.Reinl at ...2345...
Mon Dec 29 13:35:16 CET 2014


Am Samstag, den 27.12.2014, 16:56 +0100 schrieb Wolfgang, dl7nb:
> Am 27.12.2014 um 11:29 schrieb Gian:
> > Il 25/12/2014 12:14, Wolfgang, dl7nb ha scritto:
> >> Hello and Merry Christmas!
> >> I have created a program with english texts and then I have translated
> >> my texts to German via Project->translate.
> >> This works as expected. On an English installation of Linux I see
> >> English texts - on a "German" Linux I see the texts in German. So far
> >> everything is well!
> >>
> >> Can I change the language at runtime? (e.g.: I start on an "English"
> >> Linux and want my texts to be displayed in German. Something like "set
> >> language to German")
> >>
> >> Is that possible?
> >>
> >> Have a nice holyday
> >> Wolfgang
> >>
> >>
> >> No during runtime is not possible.
> >> But you can alert the user that the program should restart.
> >> Save the choice, close and restart with the language chosen from the user.
> >>
> >> Hello
> >> Gianluigi
> >>
> Hi Gianluigi,
> 
> I understand this. Can you tell me how I can make the choice and how to 
> save this? (as I found nothing about that)
> 
> Wolfgang


Salut Wolfgang

for the gambas3 IDE I tried this, at least I'v got an english Version,
but also this warning

System is "de_DE.UTF-8"

"gbx3: warning: cannot switch to language 'fr_FR.UTF-8': Datei oder
Verzeichnis nicht gefunden. Did you install the corresponding locale
packages?
" 

Public Sub _init()
Dim iRet As Integer
 iRet = Message.Question("start IDE use as language ", "System",
"English", "French")
 Select Case iRet
    Case 1
    Case 2
      System.Language = "en_EN.UTF-8"
    Case 3
      System.Language = "fr_FR.UTF-8"
 End Select

_init starts from a module, so no form is still loaded

-- 
Amicalement
Charlie





More information about the User mailing list