I have a multilingual web site and need to set the <HTML lang=xxxx>, but I can't find a way to programmaticlly set the value. XPages is not an option.
I'm using the $$HTMLHead field to set the META TAGS to point to the language pages with the link-alternate tag, but I still need the document language set in <html>
The current header looks like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> this should be <html lang="en">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<link rel="alternate" hreflang="en" href="http://www.stdi.com/stdi/home.nsf/ws/offroad!OpenDocument" />
<link rel="alternate" hreflang="de" href="http://www.stdi.com/stdi/home.nsf/ws/offroad-G!OpenDocument" />
<link rel="canonical" href="http://www.stdi.com/stdi/home.nsf/ws/offroad!OpenDocument" />
Any ideas are appreciated.
Dieter
Hello Mr. Stalder,
we are HCL Partner and have a fullsize Web Content Management System (CMS) solution based on Domino. So we have all the html code generated for website in our hands and excatly this topic we have already solved in our CMS projects. If you have interest in a commercial CMS solution, you can contact me.
Best regards
Thomas
Thank you, this website is my hobby. We're documenting our travels.
Dieter
I think you might be able to change this using the $Language item, though I can't remember where it is set through the UI. I think you set it to the value you want in the lang= part. I can't test right now, but give that a try.
Hi Ben
I'll play around with the $Language item and post my results here.
Dieter
I don't think it works after all. It is a real field, defined in the API, but it doesn't seem to have the desired effect on the web engine. My notes show that I was irritated about this several years ago. (Midas does render the language tag correctly, just as it does text that is language tagged, but the HTTP web engine doesn't. Useless.)
I am able to use the $$HTMLTagAttributes field to do this. A computed for display field with a value of "lang=\"en\"" works for me.
Sam
You are my hero, it worked. The $$HTMLTagAttributes field was exactly what I was looking for.
Thank you
Dieter
Sam, what version of Domino are you using? I'm just curious because I am not familiar with $$HTMLTagAttributes, and it sounds like a handy one to know.
Never mind. I found it documented (on the web, not in the API) for Domino 8. It goes along with the $$HTMLOptions and $$FrontMatter fields. Not sure how I missed it.
We're using Domino 9.0.1. I found this field in iwaredir, along with $$HTMLFrontMatter, which I suppose works for the doctype. I have no idea if either of these are documented anywhere, or where that might be.