mirror of
https://github.com/friendica/friendica
synced 2025-04-22 11:10:11 +00:00
Use ISO-639-1 for the language detection
This commit is contained in:
parent
74b4eddcf7
commit
3f2b0b9422
7 changed files with 113 additions and 114 deletions
|
@ -304,7 +304,7 @@ class Timeline extends BaseModule
|
|||
} elseif ($this->selectedTab == ChannelEntity::AUDIO) {
|
||||
$condition = ["`media-type` & ?", 4];
|
||||
} elseif ($this->selectedTab == ChannelEntity::LANGUAGE) {
|
||||
$condition = ["JSON_EXTRACT(JSON_KEYS(language), '$[0]') = ?", $this->l10n->convertCodeForLanguageDetection(User::getLanguageCode($uid))];
|
||||
$condition = ["JSON_EXTRACT(JSON_KEYS(language), '$[0]') = ?", User::getLanguageCode($uid)];
|
||||
} elseif (is_numeric($this->selectedTab)) {
|
||||
$condition = $this->getUserChannelConditions($this->selectedTab, $this->session->getLocalUserId());
|
||||
}
|
||||
|
@ -421,7 +421,6 @@ class Timeline extends BaseModule
|
|||
{
|
||||
$conditions = [];
|
||||
$languages = $this->pConfig->get($uid, 'channel', 'languages', [User::getLanguageCode($uid)]);
|
||||
$languages = $this->l10n->convertForLanguageDetection($languages);
|
||||
foreach ($languages as $language) {
|
||||
$conditions[] = "JSON_EXTRACT(JSON_KEYS(language), '$[0]') = ?";
|
||||
$condition[] = $language;
|
||||
|
|
|
@ -260,7 +260,7 @@ class Display extends BaseSettings
|
|||
$bookmarked_timelines = $this->pConfig->get($uid, 'system', 'network_timelines', $this->getAvailableTimelines($uid, true)->column('code'));
|
||||
$enabled_timelines = $this->pConfig->get($uid, 'system', 'enabled_timelines', $this->getAvailableTimelines($uid, false)->column('code'));
|
||||
$channel_languages = $this->pConfig->get($uid, 'channel', 'languages', [User::getLanguageCode($uid)]);
|
||||
$languages = $this->l10n->getAvailableLanguages(true);
|
||||
$languages = $this->l10n->getLanguageCodes(true);
|
||||
|
||||
$timelines = [];
|
||||
foreach ($this->getAvailableTimelines($uid) as $timeline) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue