add some more stuff to admin/account_edit (service class, language, and techlevel if appropriate). Fix en-au and en-gb so they are listed as languages, and move language selector stuff to include/language.php instead of include/text.php; new file Zotlabs/Lib/Techlevels.php so we only need to write the selection array once.
This commit is contained in:
@@ -1837,42 +1837,6 @@ function mimetype_select($channel_id, $current = 'text/bbcode') {
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
||||
function lang_selector() {
|
||||
|
||||
$langs = glob('view/*/hstrings.php');
|
||||
|
||||
$lang_options = array();
|
||||
$selected = "";
|
||||
|
||||
if(is_array($langs) && count($langs)) {
|
||||
$langs[] = '';
|
||||
if(! in_array('view/en/hstrings.php',$langs))
|
||||
$langs[] = 'view/en/';
|
||||
asort($langs);
|
||||
foreach($langs as $l) {
|
||||
if($l == '') {
|
||||
$lang_options[""] = t('default');
|
||||
continue;
|
||||
}
|
||||
$ll = substr($l,5);
|
||||
$ll = substr($ll,0,strrpos($ll,'/'));
|
||||
$selected = (($ll === App::$language && (x($_SESSION, 'language'))) ? $ll : $selected);
|
||||
$lang_options[$ll] = get_language_name($ll, $ll) . " ($ll)";
|
||||
}
|
||||
}
|
||||
|
||||
$tpl = get_markup_template("lang_selector.tpl");
|
||||
$o = replace_macros($tpl, array(
|
||||
'$title' => t('Select an alternate language'),
|
||||
'$langs' => array($lang_options, $selected),
|
||||
|
||||
));
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
||||
function engr_units_to_bytes ($size_str) {
|
||||
if(! $size_str)
|
||||
return $size_str;
|
||||
|
Reference in New Issue
Block a user