On peut facilement fournir le même exécutable à des français et des anglais.

Code : Tout sélectionner
;/ Return the default primary language identifier ( 0 system / 1 User )
ProcedureDLL GetLanguage(wich)
If wich
ProcedureReturn GetUserDefaultLangID_() & 511
Else
ProcedureReturn GetSystemDefaultLangID_() & 511
EndIf
EndProcedure
;/ Initialise the LocalText function with a Primary language identifier
;/ German = 7 / English 9 / French 12 / Spanish = 10 / Italian = 16 / Portuguese = 22
ProcedureDLL LocalTextInit(LocalLanguageIdentifier)
Global LocaltextIsLocal
LocaltextIsLocal=0
If GetLanguage(1)=LocalLanguageIdentifier
LocaltextIsLocal=1
EndIf
EndProcedure
;/ Return the correct text regarding the user language
ProcedureDLL.s LocalText(Local.s,International.s)
If LocaltextIsLocal
ProcedureReturn Local
Else
ProcedureReturn International
EndIf
EndProcedure
;/ Test
LocalTextInit(12) ;/ French Language as local
WindowsTitle.s=LocalText("Version Française","English Version")
OpenWindow(0,0,0,200,120,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,WindowsTitle)
CreateGadgetList(WindowID())
CreateStatusBar(0,WindowID())
StatusBarText(0,0,LocalText("C'est juste un test","It's just a test"),#PB_StatusBar_Center)
ButtonGadget(0, 10, 10, 180, 80, LocalText("Cliquez Moi","Clic Me"))
GadgetToolTip(0,LocalText("Ce texte est en Français","This text is in English"))
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow