Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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:
Offline
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
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
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
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
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