#include #include #include #include Global $dictionary[5] $hGUI = GUICreate("", 300, 200) $idCheckbox = GUICtrlCreateCheckbox("", 10, 10, 185, 25) $Close = GUICtrlCreateButton("", 210, 170, 85, 25) GUISetState(@SW_SHOW, $hGUI) $string = "HKEY_CURRENT_USER\Software\TESTGIS" $s_language = RegRead($string, "Language") If Not @error Then If $s_language = "ENG" Then GUICtrlSetState($idCheckbox, $GUI_CHECKED) If $s_language = "RUS" Then GUICtrlSetState($idCheckbox, $GUI_UNCHECKED) Else RegWrite($string, "Language", "REG_SZ", "ENG") GUICtrlSetState($idCheckbox, $GUI_CHECKED) $s_language = "ENG" EndIf For $i = 0 To UBound($dictionary) - 1 $dictionary[$i] = Eval($s_language & $i) Next _translate() Example() Func _translate() GUICtrlSetData($Close,$dictionary[0]) GUICtrlSetData($idCheckbox,$dictionary[1]) EndFunc Func Example() ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $Close ExitLoop Case $idCheckbox If _IsChecked($idCheckbox) Then MsgBox($MB_SYSTEMMODAL, "", $dictionary[3], 0, $hGUI) RegWrite($string, "Language", "REG_SZ", "RUS") Else MsgBox($MB_SYSTEMMODAL, "", $dictionary[4], 0, $hGUI) RegWrite($string, "Language", "REG_SZ", "ENG") EndIf EndSwitch WEnd ; Delete the previous GUI and all controls. GUIDelete($hGUI) EndFunc ;==>Example Func _IsChecked($idControlID) Return BitAND(GUICtrlRead($idControlID), $GUI_CHECKED) = $GUI_CHECKED EndFunc ;==>_IsChecked