home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2008 September
/
PCWorld_2008-09_cd.bin
/
komunikace
/
kmeleon
/
K-Meleon1.1.3en-US.exe
/
macros
/
lang.kmm
< prev
next >
Wrap
Text File
|
2007-05-07
|
2KB
|
48 lines
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)
# ---------- Language Selection ------------------------------------------------------------------------------------
#
# Dependencies : -
# Resources : -
# Preferences : -
#
# ------------------------------------------------------------------------------------------------------------------
$Lang_Codes="en-US;";
$Lang_Names="&English/International;";
Lang_SetLanguage{
menuchecked=($KM_Locale==$ARG);
$_Lang_SetLanguage=$ARG; &_Lang_SetLanguage;
}
# ----- PRIVATE
_Lang_SetLanguage{
$__c=$KM_Locale==$ARG?YES:confirm(_("You have to restart K-Meleon to make this change take effect everywhere.\n\nDo you really want to change the GUI's language?"),_("Change Language"),YESNO);
$__c==YES?&_Lang_SetLang:0;
}
_Lang_SetLang{
setpref(STRING,"general.useragent.locale",$_Lang_SetLanguage);
setpref(STRING,"general.useragent.contentlocale",substr($_Lang_SetLanguage,3));
$KM_Locale=$_Lang_SetLanguage; $__x="resource:///"; $__y="locales/"; $__z="readme.html";
$__s=getpref(STRING,$KM_Homepage);
$__b=(($__s==$__x.$__z)+(index($__s,$__x.$__y)==0)*(index($__s,$__z)==length($__s)-length($__z)));
$__s=$_Lang_SetLanguage=="en-US"?$__x.$__z:$__x.$__y.$_Lang_SetLanguage."/".$__z;
$__b?setpref(STRING,$KM_Homepage,$__s):0;
}
_Lang_BuildMenu{
$_l="Lan&guage"; $_c=$Lang_Codes; $_n=$Lang_Names;
setmenu(Preferences,popup,$_l);
while($_c) &_Lang_BuildMenuLoop;
}
_Lang_BuildMenuLoop{
setmenu($_l,macro,substr($_n,0,index($_n,";")),"Lang_SetLanguage(".substr($_c,0,index($_c,";")).")");
$_c=substr($_c,index($_c,";")+1);
$_n=substr($_n,index($_n,";")+1);
}
$OnInit=$OnInit."_Lang_BuildMenu;";
# ------------------------------------------------------------------------------------------------------------------
$macroModules=$macroModules."Lang;";