Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-08-06 15:50:03

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Add current LANG into tag page doctype

The txp_tag.php file hasn’t the current LANG attribute (defined in prefs) into its doctype.

File /textpattern/include/txp_tag.php (line #24):

<!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" xml:lang="<?php echo LANG; ?>" lang="<?php echo LANG; ?>">

Cheers,


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#2 2010-08-07 13:30:05

monkeyninja
Plugin Author
From: Sheffield, UK
Registered: 2008-10-14
Posts: 239
Website

Re: Add current LANG into tag page doctype

This should probably be addressed in the default page template files too. I would have expected to see the <txp:lang /> tag used rather than the hard-coded ‘en’. See example 1 of the Textbook entry for how it probably should be out-of-the-box:

http://textbook.textpattern.net/wiki/index.php?title=lang

Offline

#3 2010-08-07 13:47:29

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Add current LANG into tag page doctype

It’s a waste of computing power to use a tag for something that won’t change (and if it does, you’ll probably have to edit the templates anyway)

Offline

#4 2010-08-07 13:58:32

monkeyninja
Plugin Author
From: Sheffield, UK
Registered: 2008-10-14
Posts: 239
Website

Re: Add current LANG into tag page doctype

ruud wrote:

It’s a waste of computing power to use a tag for something that won’t change (and if it does, you’ll probably have to edit the templates anyway)

Generally I’d agree with you, but it just seems that if you just install and use Textpattern as is then it is something that should really be responding to the language settings you’ve made with the installation. I am sure the majority of TXP users replace the templates early on in their site development and can make a personal informed decision on their page’s language.

Offline

#5 2010-08-07 14:15:06

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Add current LANG into tag page doctype

Since you choose the language at the very beginning of installation, I guess this could be done as part of the installation process instead of adding a tag.

Offline

#6 2010-08-07 14:43:04

monkeyninja
Plugin Author
From: Sheffield, UK
Registered: 2008-10-14
Posts: 239
Website

Re: Add current LANG into tag page doctype

ruud wrote:

Since you choose the language at the very beginning of installation, I guess this could be done as part of the installation process instead of adding a tag.

Very true. Just took a quick glance over the setup code and that looks doable. I was just thinking that applying the TXP tag would be a simpler task, but I don’t think that is necessarily the case now.

Offline

#7 2010-08-07 16:33:29

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Add current LANG into tag page doctype

On the other hand, the default templates all have content in english, so if another language is specified in the HTML code, wouldn’t the actual content of the page have to be in that same language as well?

Offline

Board footer

Powered by FluxBB