Bug 6481

Summary: Koha doesn't have a way to set a preferred language from system
Product: Koha Reporter: Fernando L. Canizo <conan>
Component: I18N/L10NAssignee: Frédéric Demians <frederic>
Status: RESOLVED FIXED QA Contact: Bugs List <koha-bugs>
Severity: enhancement    
Priority: P5 - low CC: chris, katrin.fischer, koha.sekjal, veron
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Who signed the patch off: Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 7224    

Description Fernando L. Canizo 2011-06-07 21:33:16 UTC
There's something wrong with this snippet:


select variable,value,explanation from systempreferences where variable like '%language%';

variable	value	explanation
language	en,es-ES	Set the default language in the staff client.
opaclanguages	en,es-ES	Set the default language in the OPAC.


Koha doesn't have a way to set a default language from system. You can allow user to decide, but that gets into a cookie, not into database. And that cookie doesn't get set up upon first login for some configurations (that could be material for another bug).

So we need a way to select a default language and set it into system preferences.

The explanation of those two variable tells they set a default, but how can they claim to set a default language if 'value' holds a list of possibilities and there is no way to arrange it's order?

I would like to add a new syspref called "available_languages" and change the behaviour of this two to actually do what they claim. But on an irc chat with Magnuse and Cait we agree that it would be more cumbersome and confusing to change the way those variables work now.

So even when they will keep misleading names, it's preferable to have two new syspref to set a default languages and keep these two the way they work now: as a list of language options, and, of course, modify their descriptions.

I propose to add "preferred_language" and "preferred_opaclanguage" to systempreferences table.

Finally, I believe this affects master too, but my testing was done in a 3.4.x installation.
Comment 1 Magnus Enger 2011-06-07 21:41:18 UTC
*** Bug 2562 has been marked as a duplicate of this bug. ***
Comment 2 Ian Walls 2011-11-15 12:47:42 UTC
Idea:  adding "language administration" area to Admin, so the librarian can see all the available translations, their completeness, whether they're enabled for the OPAC or staff client, and which is 'default'.  A link or other interface to translate.koha-community.org would make it easier for librarians to improve the translations as they work, distributing the workload over more folks.
Comment 3 Katrin Fischer 2015-01-06 18:19:50 UTC
*** Bug 6563 has been marked as a duplicate of this bug. ***
Comment 4 Katrin Fischer 2019-03-16 10:12:13 UTC
>The explanation of those two variable tells they set a default, but how can they >claim to set a default language if 'value' holds a list of possibilities and >there is no way to arrange it's order?

It's possible now to change the order with simple drag and drop. I think this resolves the issue of picking the default as it will be the first language in the list. Please reopen, if I am missing something.