diff --git a/sourcecode/apis/contentauthor/app/Http/Middleware/LtiLocale.php b/sourcecode/apis/contentauthor/app/Http/Middleware/LtiLocale.php index f85eecb600..ebc2614c79 100644 --- a/sourcecode/apis/contentauthor/app/Http/Middleware/LtiLocale.php +++ b/sourcecode/apis/contentauthor/app/Http/Middleware/LtiLocale.php @@ -2,10 +2,10 @@ namespace App\Http\Middleware; -use Illuminate\Support\Facades\App; +use App\H5pLti; use Closure; +use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Session; -use App\H5pLti; class LtiLocale { @@ -23,11 +23,28 @@ public function handle($request, Closure $next) $ltiRequest = $this->h5pLti->getValidatedLtiRequest(); if ($ltiRequest != null) { if ($ltiRequest->getLocale()) { + // Store the original code, even if we don't have this locale, maybe H5P does Session::put('locale', $ltiRequest->getLocale()); } } - App::setLocale(Session::get('locale', config('app.fallback_locale'))); + App::setLocale($this->resolveLocale(Session::get('locale', config('app.fallback_locale')))); return $next($request); } + + /** + * Check if we have a translation for the code. If that failes, and a code longer than two characters is + * given, check if we have a translation for the two-code version. Failing that the original code is returned. + */ + private function resolveLocale(string $locale): string + { + if (!file_exists(resource_path('lang/' . $locale)) && strlen($locale) > 2) { + $lang = \Iso639p3::code2letters($locale); + if (file_exists(resource_path('lang/' . $lang))) { + return $lang; + } + } + + return $locale; + } } diff --git a/sourcecode/apis/contentauthor/app/Libraries/H5P/H5PConfigAbstract.php b/sourcecode/apis/contentauthor/app/Libraries/H5P/H5PConfigAbstract.php index 9bb91819f8..3fcf21d63a 100644 --- a/sourcecode/apis/contentauthor/app/Libraries/H5P/H5PConfigAbstract.php +++ b/sourcecode/apis/contentauthor/app/Libraries/H5P/H5PConfigAbstract.php @@ -8,6 +8,7 @@ use App\Libraries\H5P\Interfaces\ConfigInterface; use App\Libraries\H5P\Interfaces\H5PAdapterInterface; use Illuminate\Support\Facades\Session; +use Iso639p3; use Ramsey\Uuid\Uuid; use function Cerpus\Helper\Helpers\profile as config; @@ -272,22 +273,28 @@ protected function addCustomEditorStyles(): void } } + /** + * Language file to load for H5P Editor + */ private function getLanguage(): string { - $preferredH5PLanguage = LtiToH5PLanguage::convert(Session::get('locale')); - - if ($this->languageFileExists($preferredH5PLanguage)) { - return "language/$preferredH5PLanguage.js"; - } - - return 'language/en.js'; + return "language/" . $this->resolveEditorLocale(Session::get('locale')) . ".js"; } - private function languageFileExists($preferredLanguage): bool + private function resolveEditorLocale($locale): string { - $path = base_path('vendor/h5p/h5p-editor/language/' . $preferredLanguage . '.js'); + if (is_string($locale)) { + if (file_exists(base_path('vendor/h5p/h5p-editor/language/' . $locale . '.js'))) { + return $locale; + } elseif (strlen($locale) > 2) { + $lang = Iso639p3::code2letters($locale); + if (file_exists(base_path('vendor/h5p/h5p-editor/language/' . $lang . '.js'))) { + return $lang; + } + } + } - return file_exists($path); + return 'en'; } private function getL10n(): array diff --git a/sourcecode/apis/contentauthor/resources/lang/de-de/article.php b/sourcecode/apis/contentauthor/resources/lang/de/article.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/de-de/article.php rename to sourcecode/apis/contentauthor/resources/lang/de/article.php diff --git a/sourcecode/apis/contentauthor/resources/lang/de-de/attribution.php b/sourcecode/apis/contentauthor/resources/lang/de/attribution.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/de-de/attribution.php rename to sourcecode/apis/contentauthor/resources/lang/de/attribution.php diff --git a/sourcecode/apis/contentauthor/resources/lang/de-de/auth.php b/sourcecode/apis/contentauthor/resources/lang/de/auth.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/de-de/auth.php rename to sourcecode/apis/contentauthor/resources/lang/de/auth.php diff --git a/sourcecode/apis/contentauthor/resources/lang/de-de/common.php b/sourcecode/apis/contentauthor/resources/lang/de/common.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/de-de/common.php rename to sourcecode/apis/contentauthor/resources/lang/de/common.php diff --git a/sourcecode/apis/contentauthor/resources/lang/de-de/embed.php b/sourcecode/apis/contentauthor/resources/lang/de/embed.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/de-de/embed.php rename to sourcecode/apis/contentauthor/resources/lang/de/embed.php diff --git a/sourcecode/apis/contentauthor/resources/lang/de-de/game.php b/sourcecode/apis/contentauthor/resources/lang/de/game.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/de-de/game.php rename to sourcecode/apis/contentauthor/resources/lang/de/game.php diff --git a/sourcecode/apis/contentauthor/resources/lang/de-de/h5p-editor.php b/sourcecode/apis/contentauthor/resources/lang/de/h5p-editor.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/de-de/h5p-editor.php rename to sourcecode/apis/contentauthor/resources/lang/de/h5p-editor.php diff --git a/sourcecode/apis/contentauthor/resources/lang/de-de/h5p.php b/sourcecode/apis/contentauthor/resources/lang/de/h5p.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/de-de/h5p.php rename to sourcecode/apis/contentauthor/resources/lang/de/h5p.php diff --git a/sourcecode/apis/contentauthor/resources/lang/de-de/licenses.php b/sourcecode/apis/contentauthor/resources/lang/de/licenses.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/de-de/licenses.php rename to sourcecode/apis/contentauthor/resources/lang/de/licenses.php diff --git a/sourcecode/apis/contentauthor/resources/lang/de-de/link.php b/sourcecode/apis/contentauthor/resources/lang/de/link.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/de-de/link.php rename to sourcecode/apis/contentauthor/resources/lang/de/link.php diff --git a/sourcecode/apis/contentauthor/resources/lang/de-de/lock.php b/sourcecode/apis/contentauthor/resources/lang/de/lock.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/de-de/lock.php rename to sourcecode/apis/contentauthor/resources/lang/de/lock.php diff --git a/sourcecode/apis/contentauthor/resources/lang/de-de/pagination.php b/sourcecode/apis/contentauthor/resources/lang/de/pagination.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/de-de/pagination.php rename to sourcecode/apis/contentauthor/resources/lang/de/pagination.php diff --git a/sourcecode/apis/contentauthor/resources/lang/de-de/passwords.php b/sourcecode/apis/contentauthor/resources/lang/de/passwords.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/de-de/passwords.php rename to sourcecode/apis/contentauthor/resources/lang/de/passwords.php diff --git a/sourcecode/apis/contentauthor/resources/lang/de-de/questions.php b/sourcecode/apis/contentauthor/resources/lang/de/questions.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/de-de/questions.php rename to sourcecode/apis/contentauthor/resources/lang/de/questions.php diff --git a/sourcecode/apis/contentauthor/resources/lang/de-de/validation.php b/sourcecode/apis/contentauthor/resources/lang/de/validation.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/de-de/validation.php rename to sourcecode/apis/contentauthor/resources/lang/de/validation.php diff --git a/sourcecode/apis/contentauthor/resources/lang/en-gb/article.php b/sourcecode/apis/contentauthor/resources/lang/en/article.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/en-gb/article.php rename to sourcecode/apis/contentauthor/resources/lang/en/article.php diff --git a/sourcecode/apis/contentauthor/resources/lang/en-gb/attribution.php b/sourcecode/apis/contentauthor/resources/lang/en/attribution.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/en-gb/attribution.php rename to sourcecode/apis/contentauthor/resources/lang/en/attribution.php diff --git a/sourcecode/apis/contentauthor/resources/lang/en-gb/auth.php b/sourcecode/apis/contentauthor/resources/lang/en/auth.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/en-gb/auth.php rename to sourcecode/apis/contentauthor/resources/lang/en/auth.php diff --git a/sourcecode/apis/contentauthor/resources/lang/en-gb/common.php b/sourcecode/apis/contentauthor/resources/lang/en/common.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/en-gb/common.php rename to sourcecode/apis/contentauthor/resources/lang/en/common.php diff --git a/sourcecode/apis/contentauthor/resources/lang/en-gb/emails/collaboration-invite.php b/sourcecode/apis/contentauthor/resources/lang/en/emails/collaboration-invite.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/en-gb/emails/collaboration-invite.php rename to sourcecode/apis/contentauthor/resources/lang/en/emails/collaboration-invite.php diff --git a/sourcecode/apis/contentauthor/resources/lang/en-gb/embed.php b/sourcecode/apis/contentauthor/resources/lang/en/embed.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/en-gb/embed.php rename to sourcecode/apis/contentauthor/resources/lang/en/embed.php diff --git a/sourcecode/apis/contentauthor/resources/lang/en-gb/game.php b/sourcecode/apis/contentauthor/resources/lang/en/game.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/en-gb/game.php rename to sourcecode/apis/contentauthor/resources/lang/en/game.php diff --git a/sourcecode/apis/contentauthor/resources/lang/en-gb/h5p-editor.php b/sourcecode/apis/contentauthor/resources/lang/en/h5p-editor.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/en-gb/h5p-editor.php rename to sourcecode/apis/contentauthor/resources/lang/en/h5p-editor.php diff --git a/sourcecode/apis/contentauthor/resources/lang/en-gb/h5p.php b/sourcecode/apis/contentauthor/resources/lang/en/h5p.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/en-gb/h5p.php rename to sourcecode/apis/contentauthor/resources/lang/en/h5p.php diff --git a/sourcecode/apis/contentauthor/resources/lang/en-gb/licenses.php b/sourcecode/apis/contentauthor/resources/lang/en/licenses.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/en-gb/licenses.php rename to sourcecode/apis/contentauthor/resources/lang/en/licenses.php diff --git a/sourcecode/apis/contentauthor/resources/lang/en-gb/link.php b/sourcecode/apis/contentauthor/resources/lang/en/link.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/en-gb/link.php rename to sourcecode/apis/contentauthor/resources/lang/en/link.php diff --git a/sourcecode/apis/contentauthor/resources/lang/en-gb/lock.php b/sourcecode/apis/contentauthor/resources/lang/en/lock.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/en-gb/lock.php rename to sourcecode/apis/contentauthor/resources/lang/en/lock.php diff --git a/sourcecode/apis/contentauthor/resources/lang/en-gb/pagination.php b/sourcecode/apis/contentauthor/resources/lang/en/pagination.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/en-gb/pagination.php rename to sourcecode/apis/contentauthor/resources/lang/en/pagination.php diff --git a/sourcecode/apis/contentauthor/resources/lang/en-gb/passwords.php b/sourcecode/apis/contentauthor/resources/lang/en/passwords.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/en-gb/passwords.php rename to sourcecode/apis/contentauthor/resources/lang/en/passwords.php diff --git a/sourcecode/apis/contentauthor/resources/lang/en-gb/questions.php b/sourcecode/apis/contentauthor/resources/lang/en/questions.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/en-gb/questions.php rename to sourcecode/apis/contentauthor/resources/lang/en/questions.php diff --git a/sourcecode/apis/contentauthor/resources/lang/en-gb/validation.php b/sourcecode/apis/contentauthor/resources/lang/en/validation.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/en-gb/validation.php rename to sourcecode/apis/contentauthor/resources/lang/en/validation.php diff --git a/sourcecode/apis/contentauthor/resources/lang/ko-kr/article.php b/sourcecode/apis/contentauthor/resources/lang/ko/article.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/ko-kr/article.php rename to sourcecode/apis/contentauthor/resources/lang/ko/article.php diff --git a/sourcecode/apis/contentauthor/resources/lang/ko-kr/attribution.php b/sourcecode/apis/contentauthor/resources/lang/ko/attribution.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/ko-kr/attribution.php rename to sourcecode/apis/contentauthor/resources/lang/ko/attribution.php diff --git a/sourcecode/apis/contentauthor/resources/lang/ko-kr/auth.php b/sourcecode/apis/contentauthor/resources/lang/ko/auth.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/ko-kr/auth.php rename to sourcecode/apis/contentauthor/resources/lang/ko/auth.php diff --git a/sourcecode/apis/contentauthor/resources/lang/ko-kr/common.php b/sourcecode/apis/contentauthor/resources/lang/ko/common.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/ko-kr/common.php rename to sourcecode/apis/contentauthor/resources/lang/ko/common.php diff --git a/sourcecode/apis/contentauthor/resources/lang/ko-kr/emails/collaboration-invite.php b/sourcecode/apis/contentauthor/resources/lang/ko/emails/collaboration-invite.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/ko-kr/emails/collaboration-invite.php rename to sourcecode/apis/contentauthor/resources/lang/ko/emails/collaboration-invite.php diff --git a/sourcecode/apis/contentauthor/resources/lang/ko-kr/embed.php b/sourcecode/apis/contentauthor/resources/lang/ko/embed.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/ko-kr/embed.php rename to sourcecode/apis/contentauthor/resources/lang/ko/embed.php diff --git a/sourcecode/apis/contentauthor/resources/lang/ko-kr/game.php b/sourcecode/apis/contentauthor/resources/lang/ko/game.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/ko-kr/game.php rename to sourcecode/apis/contentauthor/resources/lang/ko/game.php diff --git a/sourcecode/apis/contentauthor/resources/lang/ko-kr/h5p-editor.php b/sourcecode/apis/contentauthor/resources/lang/ko/h5p-editor.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/ko-kr/h5p-editor.php rename to sourcecode/apis/contentauthor/resources/lang/ko/h5p-editor.php diff --git a/sourcecode/apis/contentauthor/resources/lang/ko-kr/h5p.php b/sourcecode/apis/contentauthor/resources/lang/ko/h5p.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/ko-kr/h5p.php rename to sourcecode/apis/contentauthor/resources/lang/ko/h5p.php diff --git a/sourcecode/apis/contentauthor/resources/lang/ko-kr/licenses.php b/sourcecode/apis/contentauthor/resources/lang/ko/licenses.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/ko-kr/licenses.php rename to sourcecode/apis/contentauthor/resources/lang/ko/licenses.php diff --git a/sourcecode/apis/contentauthor/resources/lang/ko-kr/link.php b/sourcecode/apis/contentauthor/resources/lang/ko/link.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/ko-kr/link.php rename to sourcecode/apis/contentauthor/resources/lang/ko/link.php diff --git a/sourcecode/apis/contentauthor/resources/lang/ko-kr/lock.php b/sourcecode/apis/contentauthor/resources/lang/ko/lock.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/ko-kr/lock.php rename to sourcecode/apis/contentauthor/resources/lang/ko/lock.php diff --git a/sourcecode/apis/contentauthor/resources/lang/ko-kr/pagination.php b/sourcecode/apis/contentauthor/resources/lang/ko/pagination.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/ko-kr/pagination.php rename to sourcecode/apis/contentauthor/resources/lang/ko/pagination.php diff --git a/sourcecode/apis/contentauthor/resources/lang/ko-kr/passwords.php b/sourcecode/apis/contentauthor/resources/lang/ko/passwords.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/ko-kr/passwords.php rename to sourcecode/apis/contentauthor/resources/lang/ko/passwords.php diff --git a/sourcecode/apis/contentauthor/resources/lang/ko-kr/questions.php b/sourcecode/apis/contentauthor/resources/lang/ko/questions.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/ko-kr/questions.php rename to sourcecode/apis/contentauthor/resources/lang/ko/questions.php diff --git a/sourcecode/apis/contentauthor/resources/lang/ko-kr/validation.php b/sourcecode/apis/contentauthor/resources/lang/ko/validation.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/ko-kr/validation.php rename to sourcecode/apis/contentauthor/resources/lang/ko/validation.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nb-no/article.php b/sourcecode/apis/contentauthor/resources/lang/nb/article.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nb-no/article.php rename to sourcecode/apis/contentauthor/resources/lang/nb/article.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nb-no/attribution.php b/sourcecode/apis/contentauthor/resources/lang/nb/attribution.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nb-no/attribution.php rename to sourcecode/apis/contentauthor/resources/lang/nb/attribution.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nb_NO/auth.php b/sourcecode/apis/contentauthor/resources/lang/nb/auth.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nb_NO/auth.php rename to sourcecode/apis/contentauthor/resources/lang/nb/auth.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nb-no/common.php b/sourcecode/apis/contentauthor/resources/lang/nb/common.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nb-no/common.php rename to sourcecode/apis/contentauthor/resources/lang/nb/common.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nb-no/emails/collaboration-invite.php b/sourcecode/apis/contentauthor/resources/lang/nb/emails/collaboration-invite.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nb-no/emails/collaboration-invite.php rename to sourcecode/apis/contentauthor/resources/lang/nb/emails/collaboration-invite.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nb-no/embed.php b/sourcecode/apis/contentauthor/resources/lang/nb/embed.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nb-no/embed.php rename to sourcecode/apis/contentauthor/resources/lang/nb/embed.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nb-no/game.php b/sourcecode/apis/contentauthor/resources/lang/nb/game.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nb-no/game.php rename to sourcecode/apis/contentauthor/resources/lang/nb/game.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nb-no/h5p-editor.php b/sourcecode/apis/contentauthor/resources/lang/nb/h5p-editor.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nb-no/h5p-editor.php rename to sourcecode/apis/contentauthor/resources/lang/nb/h5p-editor.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nb-no/h5p.php b/sourcecode/apis/contentauthor/resources/lang/nb/h5p.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nb-no/h5p.php rename to sourcecode/apis/contentauthor/resources/lang/nb/h5p.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nb-no/licenses.php b/sourcecode/apis/contentauthor/resources/lang/nb/licenses.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nb-no/licenses.php rename to sourcecode/apis/contentauthor/resources/lang/nb/licenses.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nb-no/link.php b/sourcecode/apis/contentauthor/resources/lang/nb/link.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nb-no/link.php rename to sourcecode/apis/contentauthor/resources/lang/nb/link.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nb-no/lock.php b/sourcecode/apis/contentauthor/resources/lang/nb/lock.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nb-no/lock.php rename to sourcecode/apis/contentauthor/resources/lang/nb/lock.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nb_NO/pagination.php b/sourcecode/apis/contentauthor/resources/lang/nb/pagination.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nb_NO/pagination.php rename to sourcecode/apis/contentauthor/resources/lang/nb/pagination.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nb_NO/passwords.php b/sourcecode/apis/contentauthor/resources/lang/nb/passwords.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nb_NO/passwords.php rename to sourcecode/apis/contentauthor/resources/lang/nb/passwords.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nb-no/questions.php b/sourcecode/apis/contentauthor/resources/lang/nb/questions.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nb-no/questions.php rename to sourcecode/apis/contentauthor/resources/lang/nb/questions.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nb-no/validation.php b/sourcecode/apis/contentauthor/resources/lang/nb/validation.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nb-no/validation.php rename to sourcecode/apis/contentauthor/resources/lang/nb/validation.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nn-no/article.php b/sourcecode/apis/contentauthor/resources/lang/nn/article.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nn-no/article.php rename to sourcecode/apis/contentauthor/resources/lang/nn/article.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nn-no/attribution.php b/sourcecode/apis/contentauthor/resources/lang/nn/attribution.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nn-no/attribution.php rename to sourcecode/apis/contentauthor/resources/lang/nn/attribution.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nn-no/auth.php b/sourcecode/apis/contentauthor/resources/lang/nn/auth.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nn-no/auth.php rename to sourcecode/apis/contentauthor/resources/lang/nn/auth.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nn-no/common.php b/sourcecode/apis/contentauthor/resources/lang/nn/common.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nn-no/common.php rename to sourcecode/apis/contentauthor/resources/lang/nn/common.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nn-no/embed.php b/sourcecode/apis/contentauthor/resources/lang/nn/embed.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nn-no/embed.php rename to sourcecode/apis/contentauthor/resources/lang/nn/embed.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nn-no/game.php b/sourcecode/apis/contentauthor/resources/lang/nn/game.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nn-no/game.php rename to sourcecode/apis/contentauthor/resources/lang/nn/game.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nn-no/h5p-editor.php b/sourcecode/apis/contentauthor/resources/lang/nn/h5p-editor.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nn-no/h5p-editor.php rename to sourcecode/apis/contentauthor/resources/lang/nn/h5p-editor.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nn-no/h5p.php b/sourcecode/apis/contentauthor/resources/lang/nn/h5p.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nn-no/h5p.php rename to sourcecode/apis/contentauthor/resources/lang/nn/h5p.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nn-no/licenses.php b/sourcecode/apis/contentauthor/resources/lang/nn/licenses.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nn-no/licenses.php rename to sourcecode/apis/contentauthor/resources/lang/nn/licenses.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nn-no/link.php b/sourcecode/apis/contentauthor/resources/lang/nn/link.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nn-no/link.php rename to sourcecode/apis/contentauthor/resources/lang/nn/link.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nn-no/lock.php b/sourcecode/apis/contentauthor/resources/lang/nn/lock.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nn-no/lock.php rename to sourcecode/apis/contentauthor/resources/lang/nn/lock.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nn-no/pagination.php b/sourcecode/apis/contentauthor/resources/lang/nn/pagination.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nn-no/pagination.php rename to sourcecode/apis/contentauthor/resources/lang/nn/pagination.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nn-no/passwords.php b/sourcecode/apis/contentauthor/resources/lang/nn/passwords.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nn-no/passwords.php rename to sourcecode/apis/contentauthor/resources/lang/nn/passwords.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nn-no/questions.php b/sourcecode/apis/contentauthor/resources/lang/nn/questions.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nn-no/questions.php rename to sourcecode/apis/contentauthor/resources/lang/nn/questions.php diff --git a/sourcecode/apis/contentauthor/resources/lang/nn-no/validation.php b/sourcecode/apis/contentauthor/resources/lang/nn/validation.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/nn-no/validation.php rename to sourcecode/apis/contentauthor/resources/lang/nn/validation.php diff --git a/sourcecode/apis/contentauthor/resources/lang/sv-se/article.php b/sourcecode/apis/contentauthor/resources/lang/sv/article.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/sv-se/article.php rename to sourcecode/apis/contentauthor/resources/lang/sv/article.php diff --git a/sourcecode/apis/contentauthor/resources/lang/sv-se/auth.php b/sourcecode/apis/contentauthor/resources/lang/sv/auth.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/sv-se/auth.php rename to sourcecode/apis/contentauthor/resources/lang/sv/auth.php diff --git a/sourcecode/apis/contentauthor/resources/lang/sv-se/common.php b/sourcecode/apis/contentauthor/resources/lang/sv/common.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/sv-se/common.php rename to sourcecode/apis/contentauthor/resources/lang/sv/common.php diff --git a/sourcecode/apis/contentauthor/resources/lang/sv-se/emails/collaboration-invite.php b/sourcecode/apis/contentauthor/resources/lang/sv/emails/collaboration-invite.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/sv-se/emails/collaboration-invite.php rename to sourcecode/apis/contentauthor/resources/lang/sv/emails/collaboration-invite.php diff --git a/sourcecode/apis/contentauthor/resources/lang/sv-se/embed.php b/sourcecode/apis/contentauthor/resources/lang/sv/embed.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/sv-se/embed.php rename to sourcecode/apis/contentauthor/resources/lang/sv/embed.php diff --git a/sourcecode/apis/contentauthor/resources/lang/sv-se/game.php b/sourcecode/apis/contentauthor/resources/lang/sv/game.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/sv-se/game.php rename to sourcecode/apis/contentauthor/resources/lang/sv/game.php diff --git a/sourcecode/apis/contentauthor/resources/lang/sv-se/h5p-editor.php b/sourcecode/apis/contentauthor/resources/lang/sv/h5p-editor.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/sv-se/h5p-editor.php rename to sourcecode/apis/contentauthor/resources/lang/sv/h5p-editor.php diff --git a/sourcecode/apis/contentauthor/resources/lang/sv-se/h5p.php b/sourcecode/apis/contentauthor/resources/lang/sv/h5p.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/sv-se/h5p.php rename to sourcecode/apis/contentauthor/resources/lang/sv/h5p.php diff --git a/sourcecode/apis/contentauthor/resources/lang/sv-se/licenses.php b/sourcecode/apis/contentauthor/resources/lang/sv/licenses.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/sv-se/licenses.php rename to sourcecode/apis/contentauthor/resources/lang/sv/licenses.php diff --git a/sourcecode/apis/contentauthor/resources/lang/sv-se/link.php b/sourcecode/apis/contentauthor/resources/lang/sv/link.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/sv-se/link.php rename to sourcecode/apis/contentauthor/resources/lang/sv/link.php diff --git a/sourcecode/apis/contentauthor/resources/lang/sv-se/lock.php b/sourcecode/apis/contentauthor/resources/lang/sv/lock.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/sv-se/lock.php rename to sourcecode/apis/contentauthor/resources/lang/sv/lock.php diff --git a/sourcecode/apis/contentauthor/resources/lang/sv-se/pagination.php b/sourcecode/apis/contentauthor/resources/lang/sv/pagination.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/sv-se/pagination.php rename to sourcecode/apis/contentauthor/resources/lang/sv/pagination.php diff --git a/sourcecode/apis/contentauthor/resources/lang/sv-se/passwords.php b/sourcecode/apis/contentauthor/resources/lang/sv/passwords.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/sv-se/passwords.php rename to sourcecode/apis/contentauthor/resources/lang/sv/passwords.php diff --git a/sourcecode/apis/contentauthor/resources/lang/sv-se/questions.php b/sourcecode/apis/contentauthor/resources/lang/sv/questions.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/sv-se/questions.php rename to sourcecode/apis/contentauthor/resources/lang/sv/questions.php diff --git a/sourcecode/apis/contentauthor/resources/lang/sv-se/validation.php b/sourcecode/apis/contentauthor/resources/lang/sv/validation.php similarity index 100% rename from sourcecode/apis/contentauthor/resources/lang/sv-se/validation.php rename to sourcecode/apis/contentauthor/resources/lang/sv/validation.php