mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-01 09:19:09 -04:00
Differentiate between available and installed languages. Provide admin UI to install languages.
See: https://apps.sourceforge.net/trac/gallery/ticket/75 (first step for this task)
This commit is contained in:
@@ -79,13 +79,16 @@ class user_Core {
|
||||
}
|
||||
|
||||
private static function _add_locale_dropdown(&$form, $user=null) {
|
||||
$locales = locale::available();
|
||||
$locales->none = t("« none »");
|
||||
$selected_locale = ($user && $user->locale) ? $user->locale : "none";
|
||||
$form->dropdown("locale")
|
||||
->label(t("Language Preference"))
|
||||
->options($locales)
|
||||
->selected($selected_locale);
|
||||
$locales = locale::installed();
|
||||
$locales_array = (array) $locales;
|
||||
if (count($locales_array) > 1) {
|
||||
$locales->none = t("« none »");
|
||||
$selected_locale = ($user && $user->locale) ? $user->locale : "none";
|
||||
$form->dropdown("locale")
|
||||
->label(t("Language Preference"))
|
||||
->options($locales)
|
||||
->selected($selected_locale);
|
||||
}
|
||||
}
|
||||
|
||||
static function get_delete_form_admin($user) {
|
||||
|
||||
Reference in New Issue
Block a user