Le Tue, Nov 08, 2011 at 11:47:30AM -0400, David Prévot a écrit :
Le 02/11/2011 22:40, Charles Plessy a écrit :
> Le Mon, Oct 31, 2011 at 03:20:30PM -0400, David Prévot a écrit :
>>
>> The lang attribute is already automatically translated. In order to
>> translate the xml:lang one, adding the “attributes=xml:lang” option is
>> enough for your purpose, as documented in Locale::Po4a::Xml(3).
>>
>> I don't know if we want to make this attribute automatically (i.e. by
>> default) translated, any opinion about it?
> In the case of the xml:lang, in my (limited) experience, I do not see a
> situation where it would cause me problem to have it translated by default.
I don't know the exact rationale of using xml:lang instead of lang, a
look at some documentation [0] makes me think that the intended use of
xml:lang is to allow the use of several languages in different section
of a same page. (Side note: Charles, in your example, why are you using
the xml:lang attribute instead of the lang one that already exists for
the html tag?)
0:
http://docs.oasis-open.org/dita/v1.1/OS/archspec/xmllang.html
If xml:lang was translated by default, it may cause harm in the
following situation (crappy novice XML inside):
<html
xmlns="http://www.w3.org/1999/xhtml" lang="en">
<p>Some translatable text</p>
<img alt="Image with boring English untranslated text inside"
src="boring.png" xml:lang="en"/>
</html>
Hello everybody,
indeed, I was using xml:lang instead of lang for no good reason (‘cargo cult
web design’).
So to make this email less useless, let me thank you again for providing po4a,
which was instrumental for having a bilingual website for a french/japanese
conference in Tôkyô.
Have a nice day,
--
Charles Plessy
Tsurumi, Kanagawa, Japan