Hi LuCiFeR[SD],
Here an example the same as my program.
Code: Select all
;{ GET LANGUAGE
Global SetLang.s,Lang$,language
Lang$ = Reg_ReadString(#HKEY_CURRENT_USER,"Software\Test","Lang")
If Lang$ = "" ;/ If value not exist
language = GetLanguage(1);/ get language you system
If language = 16 ; If language = 16 (16 = Italian)
LocalTextInit(16) ;/ Italian
SetLang.s = "ITA" ; Set Italian language
Else ; else
LocalTextInit(9) ;/ English
SetLang.s = "ENG" ; Set English language
EndIf
Else
If Lang$ = "ITA" ; If value on the registry is ITA
LocalTextInit(16) ;/ Italian
SetLang.s = "ITA" ; Set Italian as language
ElseIf Lang$ = "ENG"; else if value is ENG
LocalTextInit(9) ;/ English
SetLang.s = "ENG"; Set English as language
EndIf
EndIf
;}
If OpenWindow(0, 0, 0, 300, 200, "Example", #PB_Window_SystemMenu|#PB_Window_TitleBar|#PB_Window_ScreenCentered)
If CreateGadgetList(WindowID(0))
TextGadget(1, 20, 20, 160, 15, LocalText("Questo è una prova.", "This is a test."))
ButtonGadget(2, 160, 50, 90, 24, LocalText("Imposta","Set"))
ComboBoxGadget(3, 20, 50, 100, 100)
AddGadgetItem(3, -1, LocalText("Italiano","Italian"))
AddGadgetItem(3, -1, LocalText("Inglese","English"))
EndIf
EndIf
;{ Set Language
If Lang$ = ""
language = GetLanguage(1)
If language = 16
SetGadgetState(3, 0)
Else
SetGadgetState(3, 1)
EndIf
Else
If Lang$ = "ITA"
SetGadgetState(3, 0)
ElseIf Lang$ = "ENG"
SetGadgetState(3, 1)
EndIf
EndIf
;}
Repeat
Event = WaitWindowEvent()
GadgetID = EventGadget()
If Event = #PB_Event_Gadget
If GadgetID = 2
If GetGadgetState(3)=0
Reg_WriteString(#HKEY_CURRENT_USER,"Software\Test","Lang","ITA")
EndIf
If GetGadgetState(3)=1
Reg_WriteString(#HKEY_CURRENT_USER,"Software\Test","Lang","ENG")
EndIf
DisableGadget(2, 1)
If MessageRequester(LocalText("Informazione","Information"),LocalText("Riavviare il programma per impostare la nuova lingua?","Do you want restart the program to set up the new language?"), #PB_MessageRequester_YesNo|#MB_ICONQUESTION)=#PB_MessageRequester_Yes
Result$ = ProgramFilename()
RunProgram(Result$, "", "")
End
EndIf
EndIf
EndIf
Until Event = #PB_Event_CloseWindow
End
Please try it to verify if you work.
If you do not work, consider am a problem of your system.
New updating of Oridan Windows Cleanup.
Setup file:
http://home.tele2.it/oridan/down/Oridan ... pSetup.exe
Zip file:
http://home.tele2.it/oridan/down/Oridan ... leanup.zip