5.3.0-git
2016-09-25

[#10457] Auto-detect locale support
Summary Auto-detect locale support
Queue Horde Base
Queue Version Git master
Type Enhancement
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester wrobel (at) horde (dot) org
Created 2011-08-26 (1857 days ago)
Due
Updated 2016-01-18 (251 days ago)
Assigned
Resolved 2016-01-18 (251 days ago)
Milestone 6.0.0
Patch No

History
2016-01-18 10:48:36 Jan Schneider Assigned to Jan Schneider
State ⇒ Resolved
Milestone ⇒ 6.0.0
 
2016-01-18 10:48:31 Git Commit Comment #4 Reply to this comment
Changes have been made in Git (master):

commit b28487084c99bc07db5091f93d992165fe36ead8
Author: Jan Schneider <jan@horde.org>
Date:   Mon Jan 18 11:48:04 2016 +0100

     Test for supported locales (Request #10457).

  horde/lib/Test.php |   20 ++++++++++++++++++++
  1 files changed, 20 insertions(+), 0 deletions(-)

http://github.com/horde/horde/commit/b28487084c99bc07db5091f93d992165fe36ead8
2016-01-18 10:48:28 Git Commit Comment #3 Reply to this comment
Changes have been made in Git (master):

commit 1f590b27ef5e8b1d47b0cb31a2f4177f429516a7
Author: Jan Schneider <jan@horde.org>
Date:   Mon Jan 18 11:34:06 2016 +0100

     [jan] Only show languages on login page that are supported by the 
system (Request #10457).

  horde/docs/CHANGES |    2 ++
  horde/login.php    |   14 ++++++++------
  horde/package.xml  |    2 ++
  3 files changed, 12 insertions(+), 6 deletions(-)

http://github.com/horde/horde/commit/1f590b27ef5e8b1d47b0cb31a2f4177f429516a7
2016-01-18 10:48:24 Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit 629dad1c6d16c792a714ab1d24d58464ad7262dc
Author: Jan Schneider <jan@horde.org>
Date:   Mon Jan 18 11:33:13 2016 +0100

     [jan] Horde_Registry_Nlsconfig#validLang() checks now if a locale 
is installed (Request #10457).

  framework/Core/lib/Horde/Registry/Nlsconfig.php  |   21 ++++++-
  framework/Core/package.xml                       |    4 +-
  framework/Core/test/Horde/Core/NlsconfigTest.php |   70 
++++++++++++++++++++++
  3 files changed, 91 insertions(+), 4 deletions(-)

http://github.com/horde/horde/commit/629dad1c6d16c792a714ab1d24d58464ad7262dc
2011-08-26 09:40:38 Gunnar Wrobel Comment #1
Type ⇒ Enhancement
State ⇒ New
Priority ⇒ 1. Low
Summary ⇒ Auto-detect locale support
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ No
Reply to this comment
Horde 4 requires UTF-8 locales for the supported translations. 
Detecting the locales present is possible.

So we should:

1) Add a test for this in test.php so that the admin immediately sees 
which translations/charsets are actually available. This test should 
fail if there is no UTF-8 support in any locale.

2) We should disable the language selection on the login screen for 
languages not supported by the system.

3) We probably need an FAQ entry immediately then, to explain why some 
translations do not show up in the drop down list.

I briefly looked at the code to determine how this could be 
implemented. The main question I still had was how to cache the 
supported languages system wide within Horde_Core_Registry_Nlsconfig. 
But there is already a isValid($lang) method there that should allow 
to quickly add the required test infrastructure.