Jump to content

translatable string only work for pure text ?


adrianmak
 Share

Recommended Posts

i want to translate a string with html tag like

$error = __("<h2 class='error'>this is a string</h2>");

After translated, the echoed string is <h2 class='error'>a translated string</h2>.

however, when the text show up on website, the html tag in the translated string won't work.

Link to comment
Share on other sites


<?php

//$template = $page->template;

//echo "Your are in $template->name template";

if ($user->isLoggedin()) {

$session->logout();

} else {

$session->redirect("/pw1");

}

$logoutText = __("<h1>You have logged out</h1><p>You will be redirect to homepage in 3 seconds</p>");

?>

<html>

<head>

<title>Logout</title>

<meta http-equiv="refresh" content="3;url=/pw1">

</head>

<body>

<?php echo $logoutText; ?>

</body>

</html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...