Skip to content

Commit

Permalink
Sort available languages in reverse order so region-specific language…
Browse files Browse the repository at this point in the history
… comes always prior to the general one (e.g. 'en-GB|en-US|en')
  • Loading branch information
flaviocopes committed Oct 3, 2015
1 parent 14b014b commit b7da95b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion system/src/Grav/Common/Language/Language.php
Original file line number Diff line number Diff line change
@@ -81,7 +81,8 @@ public function setLanguages($langs)
*/
public function getAvailable()
{
return implode('|', $this->languages);
sort($this->languages);
return implode('|', array_reverse($this->languages));
}

/**

0 comments on commit b7da95b

Please sign in to comment.