Backend\Core\Installer\ModuleInstaller::importLocale PHP Method

importLocale() protected method

Imports the locale XML file
protected importLocale ( string $filename, boolean $overwriteConflicts = false )
$filename string The full path for the XML-file.
$overwriteConflicts boolean Should we overwrite when there is a conflict?
    protected function importLocale($filename, $overwriteConflicts = false)
    {
        $filename = (string) $filename;
        $overwriteConflicts = (bool) $overwriteConflicts;
        // load the file content and execute it
        $content = trim(file_get_contents($filename));
        // file actually has content
        if (!empty($content)) {
            // load xml
            $xml = @simplexml_load_string($content);
            // import if it's valid xml
            if ($xml !== false) {
                // import locale
                BackendLocaleModel::importXML($xml, $overwriteConflicts, $this->getLanguages(), $this->getInterfaceLanguages(), $this->getDefaultUserID(), gmdate('Y-m-d H:i:s'));
            }
        }
    }