Register theme language

@param string $domain Text domain. Unique identifier for retrieving
translated strings.
@param string $path   Optional. Path to the directory containing the .mo
file. Default false.

@return void
517067
public static function loadThemeTextdomain( $domain, $path ) {
		$callback = function () use ( &$domain, &$path ) {
			load_theme_textdomain( $domain, $path );
		};
		Action::afterSetupTheme( $callback );
	}
1197671
function registerLanguage(name, syntax) {
  var lang = syntax(low)

  languages[name] = lang

  languageNames.push(name)

  if (lang.aliases) {
    registerAlias(name, lang.aliases)
  }
}
715896
protected function load_textdomain() {
		$plugin_rel_path = dirname( $this->plugin->get_basename() ) . '/languages';
		load_plugin_textdomain( $this->plugin->get_slug(), false, $plugin_rel_path );
	}
1373190
public function registerManifest($path)
    {
        if (! File::exists($path)) {
            throw new \Exception('Extension manifest file does not exist! Path: ' . $path);
        }

        $manifest = File::get($path);
        $manifest = json_decode($manifest, true);
        $this->register($manifest);
    }
261701
public function activateDomainAction(Domain $domain)
    {
        $domain->setActive(true);
        $this->domainRepository->update($domain);
        $this->addFlashMessage('The domain "%s" has been activated.', 'Domain activated', Message::SEVERITY_OK, [htmlspecialchars($domain)], 1412373539);
        $this->unsetLastVisitedNodeAndRedirect('edit', null, null, ['site' => $domain->getSite()]);
    }
235743
public function setDictionaryPath(string $path): void
    {
        $this->customDictPath = $path;
        $this->supportedLanguages = null; // Clear cache because $path can contain new languages
    }
257634
public function registerFromPath($id, $path){
		if( !file_exists($path) ){
			return false;
		}
		$dom = $this->parser->parseFromString(file_get_contents($path));
		if( $dom ){
			$this->doms[$id] = $dom;
		}
		return false;
	}
955031
public function addResourcePaths($domain, array $paths) {
        foreach ($paths as $path) {
            $this->_paths[$domain][] = $path;
        }

        return $this;
    }
677777
public static function registerTheme($theme)
    {
        if (in_array($theme, self::$_registeredThemes)) {
            throw new Exception(__d('wasabi_cms', 'The Theme "{0}" is already registered.', $theme));
        }

        self::$_registeredThemes[] = $theme;
    }
965023
protected function initCatalogsForSingleLocale($locale, $domain) {
		if (is_string($domain)) {
			$this->initCatalog($locale, $domain);
			return;
		}
			
		if (is_array($domain)) {
			$this->initCatalogForManyDomains($locale, $domain);
			return;
		}
		
		throw new InvalidParameter('Domain must be a string or an array');
	}
86764
public function addResourcePath($domain, $path) {
        $code = $this->getCode();

        $this->getLocaleBundle()->addPath($domain, sprintf('%s/locales/%s', $path, $code));

        $this->getMessageBundle()->addPaths($domain, [
            sprintf('%s/messages/%s', $path, $code),
            sprintf('%s/messages/%s/LC_MESSAGES', $path, $code) // gettext
        ]);

        return $this;
    }
714681
public function bindDomains($domain, $catalog) {
        bind_textdomain_codeset($catalog, Config::encoding());

        return $this->cache([__METHOD__, $domain, $catalog], function() use ($domain, $catalog) {
            $locations = G11n::registry()->current()->getMessageBundle()->getPaths();

            foreach ($locations as $location) {
                bindtextdomain($catalog, $location);
            }

            return true;
        });
    }
840205
public function addTranslation($translator)
	{
		if (!file_exists( $this->getPath().'/'.TRANSLATIONS )) return;
		$translator->addTranslation( $this->getPath().'/'.TRANSLATIONS );
	}
207366
protected function initManyLocales($locale, $domain) {
		$source = $this->getCatalogContent($locale, $domain);
		
		if ($source !== false) {
			$locales = parse_ini_string($source, true);
			
			if ($locales === false) {
				throw new ParseError('Error has occurred while parsing INI file for the domain: "' . $domain . '"');
			}
			
			foreach ($locales as $locale => $catalog) {
				$this->catalogs = array_replace_recursive($this->catalogs, [
					$locale => [
						$domain => $catalog
					]
				]);
			}
		}

		if (! isset($this->initializedCatalogs[$locale])) {
			$this->initializedCatalogs[$locale] = [];
		}

		foreach (array_keys($locales) as $locale) {
			$this->initializedCatalogs[$locale][$domain] = true;
		}
	}
1052572
public function registerTranslations($app)
    {
        if(!isset($app->get('i18n')->translations['tecnocen/oauth2/*'])) {
            $app->get('i18n')->translations['tecnocen/oauth2/*'] = [
                'class'    => PhpMessageSource::class,
                'basePath' => __DIR__ . '/messages',
                'fileMap' => [
                    'tecnocen/oauth2/oauth2server' => 'oauth2server.php',
                ],
            ];
        }
    }
854210
public function setDomain(Domain $domain)
    {
        $this->domain = $domain;
        $this->domainId = $domain->getDomainId();
    }
976116
public function addPath($path, $domain = '')
    {
        $this->tpl->getLoader()->addPath($path, $domain);
        return $this;
    }