New Koha Languages Module
Hi gang, On IRC today, hdl, paul and I discussed how we represent lists of languages in Koha. At the moment we have three places where lists are represented, and all three use a different method of obtaining the list: 1. language switcher for OPAC and Intranet, and directory names for the language options (use two letter codes based on the ISO 639-1 standard ). 2. search interface (limiting by langauge like on: http://search.athenscounty.lib.oh.us/search?expanded_options=1 ( use three letter codes based on ISO 639-2, language names in the language's script, and English langauge names all hardcoded in Koha.pm). 3. hdl's new web installer, where the librarian picks her language as a step in the install process (uses two letter codes based on ISO 639-1, hardcoded). There are other places where lists of langauges will need to be represented shortly (on that I can think of off the top of my head is the new translation site that is currently in beta). I'd like to propose that we create a new Language.pm module for managing the list of languages with the aim to provide the following elements for every list of langauges: 1. two or three letter codes for the language based on ISO 639-2, which is maintained by the LOC and is inclusive of ISO 639-1: http://www.loc.gov/standards/iso639-2/ http://www.loc.gov/marc/languages/ 2. the language name in the script of the language. So for instance, 中文 for Chinese, Français for French, etc. 3. the langauge name in the language of the user, based on the template language choice ( so that if you are logged in as a French speaker, you'd see Perse (French spelling), not Persian (English spelling). To acomplish this, I propose we create a Language.pm module in Koha that provides a set of functions for finding lists in various contexts. We could utilize the existing lists around ISO-630-2 to create the initial list, perhaps stored as a flat file, or in SQL ... and we will need to create a new language_list.tmpl file to store language name translations (at least some of which can probably be automated using available translations). So, ideas, questions? Cheers, -- Joshua Ferraro SUPPORT FOR OPEN-SOURCE SOFTWARE President, Technology migration, training, maintenance, support LibLime Featuring Koha Open-Source ILS jmf@liblime.com |Full Demos at http://liblime.com/koha |1(888)KohaILS
Dorian Meid just alerted me to some 'lost' code that he commited a while back for looking at the user's browser settings to determine their default language. Here's the CVS log: http://cvs.savannah.nongnu.org/viewcvs/koha/C4/Output.pm?root=koha&r1=1.15&r2=1.16 He also recommended it'd be nice to have flags as an option to just textual strings in language lists. I'll be adding the flags in next free moment I get, along with a syspref for determining flags/noflags/both and will also take a crack at a simple browser detect function to set some defaults (which can, of course, be overridden by the user. Feedback, ideas welcome. Cheers, -- Joshua Ferraro SUPPORT FOR OPEN-SOURCE SOFTWARE President, Technology migration, training, maintenance, support LibLime Featuring Koha Open-Source ILS jmf@liblime.com |Full Demos at http://liblime.com/koha |1(888)KohaILS
participants (1)
-
Joshua M. Ferraro