Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mehrsprachigkeit beim Newsletter #58

Open
erraiva opened this issue Oct 12, 2023 · 0 comments
Open

Mehrsprachigkeit beim Newsletter #58

erraiva opened this issue Oct 12, 2023 · 0 comments

Comments

@erraiva
Copy link

erraiva commented Oct 12, 2023

Ich habe einen mehrsprachigen Newsletter. Im NL-Template frage ich die Sprache ab, um in der Zeile "Zur Online-Version" z.B. auf die entsprechende URL der Website in der entsprechenden Sprache zu kommen. Wenn ich mir die Sprache ausgeben lasse in der Vorschau des Redaxo-Artikels, der mit dem NL-Template bestückt ist, dann klappt das gut. Doch bei Testversand und Versand des NL wird nur die Clang 1 genommen wie es scheint. Sprog geht hier scheinbar auch nicht, {{url.sprache}} wird nicht umgesetzt, sondern erscheint in Klarschrift.
LG Heinz

Auszug Template:

<!DOCTYPE html>
<html lang="<?php print rex_clang::getCurrent()->getCode(); ?>" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta name="viewport" content="width=device-width"> 
usw.
<?php

$dieseseite = rex_getUrl($this->getValue('article_id'), rex_clang::getCurrentId());
$thislang = rex_clang::getCurrent()->getCode();
switch ($thislang) {
    case 'en':
        $online_lang = 'Go to online version of the newsletter.';
        $abbestell_lang = 'Unsubscribe newsletter';
        $impress_lang = 'Imprint';
        break;
    case 'it':
        $online_lang = 'Per la versione online della newsletter.';
        $abbestell_lang = 'Annullamento della newsletter';
        $impress_lang = 'Impronta';
        break;
    default:
        $online_lang = 'Zur Onlineversion des Newsletter.';
        $abbestell_lang = 'Newsletter abbestellen';
        $impress_lang = 'Impressum';
}

?>    
<style>
usw.
</style>
</head>
<body class="">

<table border="0" cellpadding="0" cellspacing="0" class="onlinelink">
<tr>
<td class="container" align="center">
<a href="<?php echo $dieseseite; ?>"><?php echo $online_lang; ?></a></td>
</tr>
</table>

REX_ARTICLE[]
usw.
<?php
$impressumlink = rex_getUrl(9);
$unsubscribelink = rex_getUrl(297).'?activationkey=REX_YNEWSLETTER_DATA[field="activationkey"]&email=REX_YNEWSLETTER_DATA[field="email"]';
?>
<table align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="right">
<p><a href="<?php echo $unsubscribelink; ?>"><?php echo $abbestell_lang; ?></a></p>
<p><a href="<?php echo $impressumlink; ?>"><?php echo $impress_lang; ?></a></p>
</td>
</tr>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant