mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-14 01:22:33 +00:00
0b0a643aef
* Initial main window geometry is calculated based on monitor resolution. * Solved problems with character sets of translations. The latest gettext and libiconv are required. Uploaded patches for Windows/MSVC 2005. * Default instant preview size matches default font size. * Included version information resources. * Corrected language names. * Installer code improvements. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@15461 a592a061-630c-0410-9148-cb99ea01b6c8
67 lines
1.5 KiB
Plaintext
67 lines
1.5 KiB
Plaintext
/*
|
|
|
|
Selection of language for LyX interface
|
|
|
|
*/
|
|
|
|
;--------------------------------
|
|
;Macros
|
|
|
|
!macro SetSystemLangItem VAR LANGNAME LANGISOCODE LANGID
|
|
|
|
${if} ${VAR} == ${LANGID}
|
|
!insertmacro MUI_INSTALLOPTIONS_WRITE "langselect.ini" "Field 2" "State" "${LANGNAME}"
|
|
${endif}
|
|
|
|
!macroend
|
|
|
|
!macro SetSystemLang VAR
|
|
|
|
!insertmacro LanguageList '!insertmacro SetSystemLangItem ${VAR}'
|
|
|
|
!macroend
|
|
|
|
!macro GetISOLangCodeItem VAR_LANGNAME VAR_LANGISOCODE LANGNAME LANGISOCODE LANGID
|
|
|
|
${if} ${VAR_LANGNAME} == "${LANGNAME}"
|
|
StrCpy ${VAR_LANGISOCODE} "${LANGISOCODE}"
|
|
${endif}
|
|
|
|
!macroend
|
|
|
|
!macro GetISOLangCode VAR_LANGNAME VAR_LANGISOCODE
|
|
|
|
;Get the language code for the selected language name
|
|
|
|
!insertmacro LanguageList '!insertmacro GetISOLangCodeItem ${VAR_LANGNAME} ${VAR_LANGISOCODE}'
|
|
|
|
!macroend
|
|
|
|
;--------------------------------
|
|
;Functions
|
|
|
|
Function InitLanguage
|
|
|
|
;Set the default for the language selection dialog to the Windows language
|
|
|
|
System::Call "kernel32::GetUserDefaultUILanguage()i.R0"
|
|
!insertmacro SetSystemLang $R0
|
|
|
|
FunctionEnd
|
|
|
|
;--------------------------------
|
|
;Page functions
|
|
|
|
Function PageLanguage
|
|
|
|
!insertmacro MUI_HEADER_TEXT "$(TEXT_LANGUAGE_TITLE)" "$(TEXT_LANGUAGE_SUBTITLE)"
|
|
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "langselect.ini"
|
|
|
|
FunctionEnd
|
|
|
|
Function PageLanguageValidate
|
|
|
|
!insertmacro MUI_INSTALLOPTIONS_READ $LangName "langselect.ini" "Field 2" "State"
|
|
!insertmacro GetISOLangCode $LangName $LangISOCode
|
|
|
|
FunctionEnd |