public static function getTranslations(string $locale)
    {
        if (stripos($locale, '_') !== false) {
            $locale = str_ireplace("_", "-", $locale);
        }
        
        $locale = strtolower($locale);
        $localePart = explode('-', $locale)[0];
        
        $languageFilesToCheck = array(
            "root",
            $localePart,
            $locale
        );
        
        // try to see if we already preloaded the locale
        $data = new \stdClass();
        $preloaded = false;
        foreach ($languageFilesToCheck as $languageFileToCheck) {
            if (ArrayUtils::doesArrayHaveValueForKey(self::$runtimeTranslations, $languageFileToCheck, true)) {
                $preloaded = true;
                
                $partial = ArrayUtils::getArrayValueForKeyOrDefault(self::$runtimeTranslations, $locale, null, true);
                ObjectUtils::merge($data, $partial);
            }
        }
        
        if ($preloaded) {
            return $data;
        }
        
        // core locale
        foreach ($languageFilesToCheck as $languageFileToCheck) {
            if (file_exists(DIR_LOCALE . $languageFileToCheck . EXT_JSON)) {
                $partial = json_decode(file_get_contents(DIR_LOCALE . $languageFileToCheck . EXT_JSON));
                ObjectUtils::merge($data, $partial);
            }
        }
        
        // project locale
        foreach ($languageFilesToCheck as $languageFileToCheck) {
            if (file_exists(DIR_LOCALE_PROJECT . $languageFileToCheck . EXT_JSON)) {
                $partial = json_decode(file_get_contents(DIR_LOCALE_PROJECT . $languageFileToCheck . EXT_JSON));
                ObjectUtils::merge($data, $partial);
            }
        }
        
        self::$runtimeTranslations[$locale] = $data;
        return $data;
    }