You can find the language processing in include/init.inc.php:
// ********************************************************
// * Language processing --- start
// ********************************************************
require('lang/english.php'); // Load the default language file: 'english.php'
$CONFIG['lang_config'] = DEFAULT_LANGUAGE; // Save the gallery-configured setting
$CONFIG['default_lang'] = $CONFIG['lang']; // Save default language
$enabled_languages_array = array();
$result = cpg_db_query("SELECT lang_id FROM {$CONFIG['TABLE_LANGUAGE']} WHERE enabled='YES'");
while ($row = mysql_fetch_assoc($result)) {
$enabled_languages_array[] = $row['lang_id'];
}
mysql_free_result($result);
// Process language selection if present in URI or in user profile or try
// autodetection if default charset is utf-8
if ($matches = $superCage->get->getMatched('lang', '/^[a-z0-9_-]+$/')) {
$USER['lang'] = $matches[0];
}
// Set the user preference to the language submit by URL parameter or by auto-detection
// Only set the preference if a corresponding file language file exists.
if (isset($USER['lang']) && !strstr($USER['lang'], '/') && file_exists('lang/' . $USER['lang'] . '.php')) {
$CONFIG['lang'] = strtr($USER['lang'], '$/\\:*?"\'<>|`', '____________');
} elseif ($CONFIG['charset'] == 'utf-8' && $CONFIG['language_autodetect'] != 0) {
include('include/select_lang.inc.php');
if (file_exists('lang/' . $USER['lang'] . '.php') == TRUE) {
if (in_array($USER['lang'], $enabled_languages_array)) {
$CONFIG['lang'] = $USER['lang'];
}
}
} else {
unset($USER['lang']);
}
if (!file_exists("lang/{$CONFIG['lang']}.php")) {
$CONFIG['lang'] = 'english';
}
// We finally load the chosen language file if it differs from English
if ($CONFIG['lang'] != 'english') {
require('lang/' . $CONFIG['lang'] . '.php');
}
set_js_var('lang_close', $lang_common['close']);
if (defined('THEME_HAS_MENU_ICONS')) {
set_js_var('icon_close_path', $THEME_DIR . 'images/icons/close.png');
} else {
set_js_var('icon_close_path', 'images/icons/close.png');
}
// ********************************************************
// * Language processing --- end
// ********************************************************
It may be that you (as admin) have stored a different language in the cookie, from a time before you changed the default language and disabled language auto detection. Does everything work as expected after the deletion of the cookie? You always can reset the language by adding the lang parameter, e.g.
index.php?lang=xxx