Opened 12 years ago

Last modified 12 years ago

#1110 new defect

Language listing should be ordered

Reported by: ianwallen Owned by: geonetwork-devel@…
Priority: minor Milestone: v2.8.0
Component: User interface (web) Version: v2.8.0RC1
Keywords: Cc:

Description

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.

Change History (1)

comment:1 by ianwallen, 12 years ago

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.

Note: See TracTickets for help on using tickets.