Active
Project:
Entity Translation
Version:
7.x-1.x-dev
Component:
Base system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 May 2011 at 09:03 UTC
Updated:
2 Dec 2012 at 17:05 UTC
I am wondering if this module is useful to help improve accessibiltiy of Drupal. Accessibility guidelines require that if a part of a page is in another language, this should tagged with a language code.
So for example, if there is a Dutch text with an English document in a filefield, the title - that is English - of this filefield should have a lang=en attribute.
I am aware that this isn't so much about translations, but about languages, but as this project is aiming at language on a per field base, it might be interesting to see if there is a common ground for a UI.
See also the discussion in the accessibility group http://groups.drupal.org/node/145894
Comments
Comment #1
plachThis is being addressed on the core queue:
#1164926: Nodes need to have languages specified separately for accessibility
#1164682: links with a known language need language identifier
Comment #2
hanno commentedChanged from fixed to needs work.
These issues above doesn't address the language of entities and more importantly to give users an UI to define in which language they fill in a field. As the entity translation module will provide a UI to have fields in other languages, this could be the same UI: Give users the ability to select a language for a field.
The difference is that while with translations, the original language of the entity is always the same as the language of the node and avaialble. With language of parts, an entity field can exist only in another language, and not in the node language itself. So the original language of this entity will be another language.
For example, the node and body text will be in Dutch, the filefield attachment title and document however will be in English.
Note that with translations, if an English translation of the body text is made, then this field is already available for the english version, and this is why I think it might be useful if we have an integrated UI.
Comment #3
plachThis is a use case we had in mind when designing language-aware fields in core, but it is a completely different logic wrt the one implemented in Entity translation. I ain't sure this is the right place for this feature request.
Comment #4
hanno commentedLanguage of parts in a multilangual site would be the same as the entity translation. For a given language, not all fields are available in that particular language and should show the field in another language with a language tag. (a "Mixed current language" setting). The special case might be that the field wouldn't be available in the original entity language.
For monolingual sites we might need another UI to add the right language to the field.
So basically, the feature request will consist of four issues:
1. allow adding 'translations' (language versions) of fields in their original language not being the entity language
2. allow a mixed language mode for (selected?) fields when displaying a entity (one of the use cases for adding language on field level)
3. show language tags in mixed entity language mode
4. see if we can reuse elements for monolingual sites with certain fields in other languages
Sorry, that I am not sure what should be handled in this issue queue or in core and already is dealt with.
EDIT: changed some entity into field terms as it was aimed on language on a field level
Comment #5
mgiffordHow do we best get some movement in this issue?
Comment #6
plach@mgifford:
There is a heavy rework of the translation UI ongoing (#1282018: Improve UX of language-aware entity forms), but I don't think it will help supporting this use case. I discussed with @Gabor a UI allowing to explictly specify the language of each field, but this is not going to happen, at least in ET and D8 core. I think the best we can do is marking fields with a language different from the entity's one with the language attribute.
Comment #7
mgiffordThanks @plach. On the most likely senario here:
"I think the best we can do is marking fields with a language different from the entity's one with the language attribute."
What do you need from us to help you with this?
Comment #8
plach@mgifford:
Well, first of all I need a feedback. Currently the page language attribute is set to the interface language. We don't have other language attributes that I'm aware of. IMHO the correct behavior should be the following:
Comment #9
hanno commentedThanks Mike for this example. That looks like the right direction. Two remarks.
* It might be prefered to provide both the xml:lang and the lang attribute (http://www.w3.org/TR/xhtml1/#C_7) .
It would then look like:
<div id="node-1" class="node" lang="en" xml:lang="en">*
lang="und"seems not needed, as the language attribute is only useful if a speech computer knows the language to switch to.* some languages need a direction attribute as well:
<div id="node-1" class="node" lang="he" xml:lang="he" dir="rtl">...a Hebrew quotation...Comment #10
plach@Hanno:
Yes, I omitted the
xml:langfor brevity.I explictly set the
undlanguage as otherwise, I guess, the piece of content would inherit the node language. Isn't this semantically wrong?Comment #11
mgiffordI asked for feedback on twitter & got:
@pjackson28 WCAG2 doesn't require lang="und" (has exception for unknown language) and only use xml:lang for XHTML.
@SteveBuell Example looks OK. Only require "lang" on divs which differ from page "lang". "xml lang" not req'd w/ doctype
on the undefined language, or lang="und" see:
http://www.w3.org/International/questions/qa-no-language
Comment #12
hanno commentedSo, the language 'und' seems not necessary? Don't know how a screen reader will behave with a undetermined language. If we include lang="und", will we get this on every numeric field, which is on a field level usually language neutral?
Comment #13
mgiffordtagging