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

For english speaking users.

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

Beitragvon Pezz » 26. Mär 2010, 03:39

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.
Pezz
 
Beiträge: 14
Registriert: 2. Jul 2009, 23:57

Beitragvon nik » 26. Mär 2010, 23:37

How about an additional meta entry for your articles? You can use them in the main page template to view the associated lang attribute.
nik
 
Beiträge: 112
Registriert: 9. Dez 2008, 20:17

Beitragvon Goldfisch » 27. Mär 2010, 07:29

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
Goldfisch
 
Beiträge: 225
Registriert: 22. Sep 2004, 16:47
Wohnort: Aschaffenburg


Zurück zu We speak english

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast