[phpBB Debug] PHP Warning: in file [ROOT]/ext/tas2580/seourls/event/listener.php on line 213: Undefined array key "FORUM_NAME"
REDAXO Forum • How to make this dynamic - xml:lang="de" lang=&quo
Seite 1 von 1

How to make this dynamic - xml:lang="de" lang=&quo

Verfasst: 26. Mär 2010, 04:39
von Pezz
Hi all,

I hope you understand my problem. ; )
I would like to have this

Code: Alles auswählen

xml:lang="de" lang="de"
dynamic and not making templates for all languages I use.

I couldn't find anything anywhere about this.
I tried real hard...

WordPress and the others are having it. Example:

Code: Alles auswählen

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
So I think Redaxo should have it as well!
Anybody knows the REX code for this?

Thank you!
P.

Verfasst: 27. Mär 2010, 00:37
von nik
How about an additional meta entry for your articles? You can use them in the main page template to view the associated lang attribute.

Verfasst: 27. Mär 2010, 08:29
von Goldfisch
set your languages in system/languages section like this

id - description name
0 - de
1 - en

in the template get the current language and description name like this:

Code: Alles auswählen

echo $REX['CLANG'][$REX['CUR_CLANG']];

Code: Alles auswählen

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" <?php echo $REX['CLANG'][$REX['CUR_CLANG']]; ?>>
peter

Re: How to make this dynamic - xml:lang="de" lang=&quo

Verfasst: 14. Nov 2012, 06:13
von Pezz
Hi Peter, I tried to thank you already, but it seems like something went wrong and now I saw that my "thank you" is not here. Better late than never!