Uploaded image for project: 'uPortal'
  1. uPortal
  2. UP-3454

Bug of the processing language in pages



      The language is hard-coded in the pages (for desktop) or is not set in the pages (for mobile).
      Solving this problem would correct a accessibility bug and will offer an elegant way to patch the layout for internationalization.

      Statement of the Problem
      In Accessibility, there is a major criterion:
      Criterion WCAG 2.0: 3.1.1
      3.1.1 Language of Page: The default human language of each Web page can be programmatically determined. (Level A)
      ( http://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-doc-lang-id.html )

      Thus, the server returns the HTTP header Content-Language correctly. And even when you change the portal language, the HTTP header changes, it is verified with Firebug, into the panel "network".
      The HTTP header indicates the language or languages of pages (several possible).
      Unfortunately, the processing language of the page is hard-coded in the page. Namely the attributes of the <html> tag , "lang" and xml: lang ". Language processing indicates the primary language of the page (one possible).

      in uportal-war/src/main/resources/layout/theme/universality/page.xsl
      86. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

      We must do the same in Mobile to view and set the lang attribute to the tag "html":

      in uportal-war/src/main/resources/layout/theme/muniversality/muniversality.xsl
      301. <xsl:template match="/">

      302. <html>

      Resolution of the problem
      we should be able to dynamically change the main language in the XSL, 

      namely, to have in French: 

      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
 and have in English: 

      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

      and so on ...

      In Internationalization, there are often differences in word length, resulting in interfaces, buttons, titles blocks that go beyond their scope.
      correcting this bug and we can patch and "overload" elegantly the portal's css (without changing the English css) of the graphic themes "uportal3", "ivy", "coal" and "hight contrast" in French, using css selectors that would apply only in French.
      Like this:
      // only in french:
      html[lang=fr] .up .myclass

      { property: value-in-french; }

      that we will avoid a complex system of css files for each language, which would be complex to manage. Because the whole layout of the portal for all languages will be in one file ...




            • Assignee:
              edalquist Eric Dalquist
              cousquer Christian Cousquer
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created:
                Estimated End Date:

                Time Tracking

                Original Estimate - 30 minutes
                Remaining Estimate - 30 minutes
                Time Spent - Not Specified
                Not Specified