function ckeditor_scayt_langcode in CKEditor - WYSIWYG HTML editor 7
Get the language locale code supported by Scayt for the specified language
2 calls to ckeditor_scayt_langcode()
- ckeditor_load_by_field in includes/
ckeditor.lib.inc - Load CKEditor for field ID
- ckeditor_profile_settings_compile in includes/
ckeditor.lib.inc - Compile settings of profile
File
- includes/
ckeditor.lib.inc, line 311 - CKEditor - The text editor for the Internet - http://ckeditor.com Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
Code
function ckeditor_scayt_langcode($lang) {
$scayt_langs = array(
'en' => 'en_US',
'es' => 'es_ES',
'fr' => 'fr_FR',
'de' => 'de_DE',
'it' => 'it_IT',
'el' => 'el_EL',
'pt' => 'pt_PT',
'da' => 'da_DA',
'sv' => 'sv_SE',
'nl' => 'nl_NL',
'nb' => 'no_NO',
'fi' => 'fi_FI',
);
if (array_key_exists($lang, $scayt_langs)) {
return $scayt_langs[$lang];
}
$default = language_default();
$default = $default->language;
if (array_key_exists($default, $scayt_langs)) {
return $scayt_langs[$default];
}
return 'en_US';
}