Permalink
Browse files

Add language selection in the configure page of the default theme

  • Loading branch information...
ArthurHoaro committed May 25, 2017
1 parent d637976 commit f39580c6fd171b849cec5832b4912182696341f2
View
@@ -62,7 +62,7 @@ class Languages
/**
* Languages constructor.
*
* @param string $language lang determined by autoLocale(), can be override.
* @param string $language lang determined by autoLocale(), can be overridden.
* @param ConfigManager $conf instance.
*/
public function __construct($language, $conf)
@@ -147,4 +147,18 @@ protected function isValidLanguage($language)
{
return preg_match('/^[a-z]{2}(_[A-Z]{2})?/', $language) === 1;
}
/**
* Get the list of available languages for Shaarli.
*
* @return array List of available languages, with their label.
*/
public static function getAvailableLanguages()
{
return [
'auto' => t('Automatic'),
'en' => t('English'),
'fr' => t('French'),
];
}
}
@@ -36,7 +36,6 @@ public static function filterAndFormat($linkDb, $selection, $prependNoteUrl, $in
}
$bookmarkLinks = array();
7
foreach ($linkDb as $link) {
if ($link['private'] != 0 && $selection == 'public') {
continue;
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit f39580c

Please sign in to comment.