30 foreach ($install_languages as $l) {
33 foreach ($install_local_languages as $l) {
36 if (!in_array($default_language, $install_languages)) {
37 throw new \InvalidArgumentException(
38 "Default language '$default_language' is not in the languages to be installed." 41 $diff = array_diff($install_local_languages, $install_languages);
42 if (count($diff) > 0) {
43 throw new \InvalidArgumentException(
44 "Local languages " . implode(
", ", $diff) .
" are not in the languages to be installed." 48 $this->install_languages = array_values($install_languages);
49 $this->install_local_languages = array_values($install_local_languages);
54 if (!strlen($l) == 2) {
55 throw new \InvalidArgumentException(
56 "'$l' is not a valid language id." checkLanguageName(string $l)
__construct(string $default_language, array $install_languages, array $install_local_languages)
getInstallLocalLanguages()