Skip to content
Snippets Groups Projects
Commit 3d8ed659 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Changing file extension of language files

parent 9c2ba760
No related branches found
No related tags found
1 merge request!1Feature sg mail
......@@ -109,17 +109,17 @@ class MailController extends ActionController {
$this->view->assign('selectedExtensionKey', $selectedExtensionKey);
$this->view->assign(
'contentLeft', file_get_contents($templatePath . $selectedLanguageLeft . '.sg_mail.locallang.xlf')
'contentLeft', file_get_contents($templatePath . $selectedLanguageLeft . '.sg_mail.locallang.sgm')
);
$this->view->assign(
'contentRight', file_get_contents($templatePath . $selectedLanguageRight . '.sg_mail.locallang.xlf')
'contentRight', file_get_contents($templatePath . $selectedLanguageRight . '.sg_mail.locallang.sgm')
);
} else {
$this->view->assign('selectedLanguageLeft', 'en');
$this->view->assign('contentLeft', file_get_contents($templatePath . 'en.sg_mail.locallang.xlf'));
$this->view->assign('contentLeft', file_get_contents($templatePath . 'en.sg_mail.locallang.sgm'));
$this->view->assign('selectedLanguageRight', 'en');
$this->view->assign('contentRight', file_get_contents($templatePath . 'en.sg_mail.locallang.xlf'));
$this->view->assign('contentRight', file_get_contents($templatePath . 'en.sg_mail.locallang.sgm'));
}
}
......@@ -128,7 +128,7 @@ class MailController extends ActionController {
* @param string $path
*/
private function writeLanguageFile(\TYPO3\CMS\Lang\Domain\Model\Language $language, $path) {
$currentLangFile = $path . $language->getLocale() . '.sg_mail.locallang.xlf';
$currentLangFile = $path . $language->getLocale() . '.sg_mail.locallang.sgm';
if (!file_exists($currentLangFile)) {
$currentLangFile = fopen($currentLangFile, 'w');
$langFileContent = 'TEST: ' . $language->getLocale();
......
......@@ -53,9 +53,9 @@ class MailTemplateService {
'templateName' => $templateName
];
$defaultLangFile = $templatePath . 'en.sg_mail.locallang.xlf';
$defaultLangFile = $templatePath . 'en.sg_mail.locallang.sgm';
if (!file_exists($defaultLangFile)) {
$defaultLangFile = fopen($templatePath . 'en.sg_mail.locallang.xlf', 'w');
$defaultLangFile = fopen($templatePath . 'en.sg_mail.locallang.sgm', 'w');
$langFileContent = 'TEST';
fwrite($defaultLangFile, $langFileContent);
}
......
  • Owner

    Warum sgm? Das ist doch Fluid? Also .html mit vollwertigem Header und dergleichen. Wie bist du darauf gekommen?

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment