[GeoNetwork-devel] [GeoNetwork opensource Developer website] #1110: Language listing should be ordered

#1110: Language listing should be ordered
----------------------------------+-----------------------------------------
Reporter: ianwallen | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: minor | Milestone: v2.8.0
Component: User interface (web) | Version: v2.8.0RC1
Keywords: |
----------------------------------+-----------------------------------------
The language drop-down list does not seem to be sorted in any particular
order. Since the list is getting longer it should probably be sorted
correctly.

The current list is as follows

   ||ara ||عربي ||
   ||cat ||Català ||
   ||chi ||中文 ||
   ||ger ||Deutsch ||
   ||eng ||English ||
   ||spa ||Español ||
   ||fre ||Français ||
   ||ita ||Italiano ||
   ||dut ||Nederlands||
   ||nor ||Norsk ||
   ||por ||Рortuguês ||
   ||rus ||Русский ||

Should this be sorted manually or via JavaScript code?
  * If manually then what should be the order. i.e. Do Arabic characters
come before "a" or after "z"?
  * JavaScript may require a little fiddling as some of the characters are
UTF-8 and may not get displayed in the desired order i.e. Р in Русский
comes before C in Català if using JavaScript sort function.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1110&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#1110: Language listing should be ordered
----------------------------------+-----------------------------------------
Reporter: ianwallen | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: minor | Milestone: v2.8.0
Component: User interface (web) | Version: v2.8.0RC1
Keywords: |
----------------------------------+-----------------------------------------

Comment(by ianwallen):

According to Oracle

http://docs.oracle.com/cd/B12037_01/server.101/b10749/ch5lings.htm

section Linguistic Indexes for Multiple Languages

...Build a single linguistic index for all languages using one of the
multilingual linguistic sorts such as GENERIC_M or FRENCH_M. These indexes
sort characters according to the rules defined in ISO 14651. ...

So assuming that we want to follow ISO 14651

I believe this is how we should be sorting the languages.

{{{
select nls_upper(name, 'NLS_SORT=GENERIC_M') from languages order by
NLSSORT(nls_upper(name, 'NLS_SORT=GENERIC_M'), 'NLS_SORT=GENERIC_M');

NLS_UPPER(NAME,'NLS_SORT=GENERIC_M')
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CATALÀ
DEUTSCH
ENGLISH
ESPAÑOL
FRANÇAIS
ITALIANO
NEDERLANDS
NORSK
POLSKI
PORTUGUÊS
SUOMI
TIẾNG VIỆT
TÜRKÇE
РУССКИЙ ЯЗЫК
العربية
中文
}}}

If there are no objections I will proceed with making the changes.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1110#comment:1&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.