View | Details | Raw Unified | Return to bug 6752 | Differences between
and this patch

Collapse All | Expand All

(-)a/lib/tinymce/jscripts/tiny_mce/plugins/ibrowser/langs/lang.class.php (-1 / +1 lines)
 Lines 55-61   function getDir() { Link Here 
55
	// constructor
55
	// constructor
56
	function PLUG_Lang( $lang = '' ) {
56
	function PLUG_Lang( $lang = '' ) {
57
		$langs = array('cs','da','de','en','es','fr','it','nl','pl','pt_br','sk');
57
		$langs = array('cs','da','de','en','es','fr','it','nl','pl','pt_br','sk');
58
		if(!in_array($lang, $langs)) die('invalid language set');
58
		if(!in_array($lang, $langs)) $lang = 'en';
59
		global $cfg;
59
		global $cfg;
60
		if ( $lang == '' ) {
60
		if ( $lang == '' ) {
61
			$this -> lang = $cfg['lang'];
61
			$this -> lang = $cfg['lang'];
(-)a/lib/tinymce/jscripts/tiny_mce/plugins/ibrowser/scripts/Init.inc.php (-1 / +17 lines)
 Lines 35-41    Link Here 
35
if (isset($user)) {
35
if (isset($user)) {
36
	// User is logged in
36
	// User is logged in
37
	$init['user'] = $user->getUsername();
37
	$init['user'] = $user->getUsername();
38
	$init['lang'] = String::substr(AppLocale::getLocale(), 0, 2);
38
	$init['lang'] = getLocaleCode(AppLocale::getLocale());
39
	$init['baseUrl'] = Config::getVar('general', 'base_url');
39
	$init['baseUrl'] = Config::getVar('general', 'base_url');
40
	$init['baseDir'] =  $baseDir;
40
	$init['baseDir'] =  $baseDir;
41
41
 Lines 51-54    Link Here 
51
	$init['captchaPath'] = null;
51
	$init['captchaPath'] = null;
52
}
52
}
53
53
54
function getLocaleCode($appLocale) {
55
	switch ($appLocale) {
56
		case 'cs_CZ': return 'cs';
57
		case 'da_DK': return 'da';
58
		case 'de_DE': return 'de';
59
		case 'en_US': return 'en';
60
		case 'es_ES': return 'es';
61
		case 'fr_CA': return 'fr';
62
		case 'it_IT': return 'it';
63
		case 'nl_NL': return 'nl';
64
		case 'pt_BR':
65
		case 'pt_PT': return 'pt_br';
66
		default: return 'en';
67
	}
68
}
69
54
?>
70
?>

Return to bug 6752