New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 695042 link

Starred by 41 users

Issue metadata

Status: Verified
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Feature



Sign in to add a comment

Allow limiting available languages within user sessions.

Project Member Reported by atwilson@chromium.org, Feb 22 2017

Issue description

Broken out from  crbug.com/373324  - admins would like the ability to limit which languages and keyboard layouts are available in user sessions. 

Max to prioritize this since primary use case is for EDU users.
 
Please please please please! It feels like this has been requested forever! 
This would be a huge help...although it would hinder my progress in learning Mandarin.
Duplicate - crbug.com/536849 (37 other stars there)

Bug 536849 is specific to keyboard settings while this one includes language settings.
The title reads "within user sessions". Will this also limit the available languages/keyboard settings when a user is NOT YET LOGGED IN? 
See the first comment, which links to  crbug.com/373324 , which covers signin-screen controls.
In our case our students have been changing the keyboard settings during Spanish class to give them an unfair advantage. Would really like to lock this setting down.
we need US intl by default so the students do not have a access settings in order to switch from us to us intl. there shoudl be a way to control this on the admmin console

Comment 9 Deleted

Comment 10 Deleted

Comment 11 Deleted

Referencing an original request dates back to 2012 that was closed as a duplicate even though it was not completely resolved: https://bugs.chromium.org/p/chromium/issues/detail?id=213478. As others mention, this may be duplicate of https://bugs.chromium.org/p/chromium/issues/detail?id=536849.
Doing Chromebook management for a K-12 district approaching 8000 Chromebooks this year...this request is no joke.  If we want to stay productive with this product we NEED the ability to lock the kids' language settings inside their profiles.

Comment 14 by crip...@gmail.com, Mar 15 2018

This is still ongoing and becoming more of an issue for us, especially using Canadian Multilingual devices where the language picks up the settings of the previous user. This should be a high priority for EDU
Extremely important to lock language settings inside student profiles in a school environment.
School district with ~3000 chromebooks reporting in, this feature would be incredible. An option for default setting would be best for us, I believe. My best case scenario would involve the chromebooks reverting back to a default keyboard layout and language in both the sign-in screen and in-session after every restart/sign-out. Full locking might be nice for certain situations, but I know plenty of the students in my district will use another keyboard language/layout legitimately and I would like this option without keeping them from that ability.
Cc: hendrich@chromium.org
Cc: maxkirsch@chromium.org
Owner: hendrich@chromium.org
 Issue 788838  has been merged into this issue.
Cc: marti...@ehillel.org
Project Member

Comment 21 by bugdroid1@chromium.org, May 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf

commit 55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf
Author: Alexander Hendrich <hendrich@chromium.org>
Date: Tue May 08 11:29:10 2018

Add 'AllowedLocales' policy

Added a policy to limit the user's choices for their main OS language.
The user can only select one of the provided languages in this list.
If the current user's language is not allowed, the user's preferred
languages are checked for an allowed entry. Otherwise the language
is set to the first valid entry in this policy or to 'en-US' as
default.

Bug:  695042 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I5c17868a97339ec32b04483734b68843ec26d2a8
Reviewed-on: https://chromium-review.googlesource.com/1034056
Reviewed-by: Pavol Marko <pmarko@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Commit-Queue: Alexander Hendrich <hendrich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556758}
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/browser/chromeos/base/locale_util.cc
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/browser/chromeos/base/locale_util.h
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/browser/chromeos/locale_change_guard.cc
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/browser/chromeos/login/session/user_session_manager.cc
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/browser/extensions/api/settings_private/prefs_util.cc
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/browser/policy/configuration_policy_handler_list_factory.cc
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/browser/policy/policy_browsertest.cc
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/browser/profiles/profile.cc
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/browser/profiles/profile.h
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/browser/profiles/profile_impl.cc
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/browser/resources/settings/languages_page/languages.js
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/browser/resources/settings/languages_page/languages_page.html
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/browser/resources/settings/languages_page/languages_page.js
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/browser/ui/webui/settings/languages_handler.cc
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/common/extensions/api/language_settings_private.idl
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/common/pref_names.cc
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/common/pref_names.h
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/test/data/policy/policy_test_cases.json
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/chrome/test/data/webui/settings/fake_language_settings_private.js
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/components/policy/resources/policy_templates.json
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/third_party/closure_compiler/externs/language_settings_private.js
[modify] https://crrev.com/55d0b0d9a56d084ee6fcbab3ac6cb800feae11bf/tools/metrics/histograms/enums.xml

Comment 22 Deleted

Comment 23 Deleted

Status: Fixed (was: Started)
Summary: Allow limiting available languages within user sessions. (was: Allow limiting available languages/keyboard layouts within user sessions.)
Labels: M-68
see  crbug.com/841301  for keyboard layout
how would I change it as a user if I want my keyboard to be in Hebrew.  
Re Comment #26:
This issue has been splitted - support for restricting languages within user sessions as an administrator has been added on the client (but not yet on the Google Admin console).

 bug 841301  adds support for restricting keyboard layouts within user sessions as an administrator. That part has not been implemented yet (but has been split off from this bug for tracking purposes).
Any timetable for Admin Console integration?
Labels: cros-verified
Verified this is working in M68.0.3437.0 10704.0.0 dev paine via user policies from YAPS.  Pending Cpanel implementation.
Cc: alemate@chromium.org
I see that in the proposed Cl https://crrev.com/c/1071532 we are allowing only language codes that satisfy [ l10n_util::CheckAndResolveLocale(language, &resolved_locale) && language == resolved_locale  ] condition. I.e. we do not allow language aliases.

This sounds like a sanity check to keep server and client data in sync, but we have keyboards for languages without UI support. This check will require users of some language variants to manually adjust their keyboard layout.

I don't think this is particularly bad , but it's just something to keep in mind.
This policy only affects the UI locale, which Chrome OS is displayed in. The user can still add other languages to his list of preferred languages or add input methods for those.
I renamed the policy and all occurences of this policy to reflect that only the UI locale is affected (https://crrev.com/c/1071532)
Project Member

Comment 33 by bugdroid1@chromium.org, May 29 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9ce49261e58f6f6992a072c0b5bd403cbb317529

commit 9ce49261e58f6f6992a072c0b5bd403cbb317529
Author: Alexander Hendrich <hendrich@chromium.org>
Date: Tue May 29 13:35:46 2018

'AllowedLocales' policy follow up

Renamed policy and all occurences to 'AllowedUILocales' to better
indicate that this policy only affects the UI locale. Also ensured that
only native UI locales can be allowed and that the policy enforced
locale is listed in the user's list of preferred languages.

Bug:  695042 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I9efabe451258f46824caaaba3b994417cd385eb8
Reviewed-on: https://chromium-review.googlesource.com/1071532
Commit-Queue: Alexander Hendrich <hendrich@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Alexander Alekseev <alemate@chromium.org>
Reviewed-by: Pavol Marko <pmarko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562408}
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/chrome/browser/chromeos/base/locale_util.cc
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/chrome/browser/chromeos/base/locale_util.h
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/chrome/browser/chromeos/locale_change_guard.cc
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/chrome/browser/chromeos/login/session/user_session_manager.cc
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/chrome/browser/extensions/api/settings_private/prefs_util.cc
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/chrome/browser/policy/configuration_policy_handler_list_factory.cc
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/chrome/browser/policy/policy_browsertest.cc
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/chrome/browser/profiles/profile.cc
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/chrome/browser/profiles/profile.h
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/chrome/browser/resources/settings/languages_page/languages.js
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/chrome/browser/resources/settings/languages_page/languages_page.js
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/chrome/browser/ui/webui/settings/languages_handler.cc
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/chrome/common/extensions/api/language_settings_private.idl
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/chrome/common/pref_names.cc
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/chrome/common/pref_names.h
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/chrome/test/data/policy/policy_test_cases.json
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/chrome/test/data/webui/settings/fake_language_settings_private.js
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/components/policy/resources/policy_templates.json
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/third_party/closure_compiler/externs/language_settings_private.js
[modify] https://crrev.com/9ce49261e58f6f6992a072c0b5bd403cbb317529/tools/metrics/histograms/enums.xml

Re #32: My point was that UI language automatically enables default input method for this language. Language variant may have different default keyboard layout. 
This probably only affects login screen and Guest session, but still this is something to keep in mind. 
Project Member

Comment 35 by bugdroid1@chromium.org, Jun 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0f3657116dbe4439acf2fa596e217eb640792329

commit 0f3657116dbe4439acf2fa596e217eb640792329
Author: Alexander Hendrich <hendrich@chromium.org>
Date: Mon Jun 25 07:56:09 2018

Refactored AllowedUILocales (isAllowedUILocale to isProhibitedUILocale)

Refactored optional attribute 'isAllowedUILocale' to
'isProhibitedUILocale' (default=false). Also set the attribute in c++
and pass it through LanguageSettingsPrivateAPI instead of accessing the
pref in the UI code.

Bug:  695042 
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: Id904a54e4798bb9a951dd65f8748bd40867e4425
Reviewed-on: https://chromium-review.googlesource.com/1111710
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Alexander Hendrich <hendrich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569979}
[modify] https://crrev.com/0f3657116dbe4439acf2fa596e217eb640792329/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.cc
[modify] https://crrev.com/0f3657116dbe4439acf2fa596e217eb640792329/chrome/browser/extensions/api/settings_private/prefs_util.cc
[modify] https://crrev.com/0f3657116dbe4439acf2fa596e217eb640792329/chrome/browser/resources/settings/languages_page/languages.js
[modify] https://crrev.com/0f3657116dbe4439acf2fa596e217eb640792329/chrome/browser/resources/settings/languages_page/languages_page.html
[modify] https://crrev.com/0f3657116dbe4439acf2fa596e217eb640792329/chrome/browser/resources/settings/languages_page/languages_page.js
[modify] https://crrev.com/0f3657116dbe4439acf2fa596e217eb640792329/chrome/common/extensions/api/language_settings_private.idl
[modify] https://crrev.com/0f3657116dbe4439acf2fa596e217eb640792329/chrome/test/data/webui/settings/fake_language_settings_private.js
[modify] https://crrev.com/0f3657116dbe4439acf2fa596e217eb640792329/third_party/closure_compiler/externs/language_settings_private.js

Checked using Yaps on 

Google Chrome: 69.0.3486.0 (Official Build) dev (32-bit)
Platform: 10866.1.0 (Official Build) dev-channel kevin
Firmware: Google_Kevin.8785.264.0

Observation: 
1. AllowedUILocales Policy is loaded.
2. Forced languages (de,en-US) are seen in settings and able switch between them.

Attached screenshots. Please take a look. Thanks.!
Screenshot 2018-07-13 at 2.57.44 PM.png
190 KB View Download
Screenshot 2018-07-13 at 2.58.54 PM.png
208 KB View Download
Screenshot 2018-07-13 at 2.59.05 PM.png
187 KB View Download
Screenshot 2018-07-13 at 3.02.32 PM.png
203 KB View Download
Status: Verified (was: Fixed)
Any update on Admin Console implementation? https://bugs.chromium.org/p/chromium/issues/detail?id=536849 specifically references Admin Console but no recent comments there either.
No update yet, I will try and ping the right people again.
Cc: emaxx@chromium.org marcuskoehler@chromium.org
 Issue 579660  has been merged into this issue.
Project Member

Comment 41 by bugdroid1@chromium.org, Oct 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a

commit 1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a
Author: Zakhar Voit <voit@google.com>
Date: Fri Oct 26 12:08:23 2018

Reland "Updated AllowedUILocales to handle preferred languages."

This is a reland of 75d0995fa069994cee37b7ba3c940c6927e7d91b

I've fixed the start-up crashes with DCHECK enabled (see diff from PATCHSET-1 to PATCHSET-3).

Original change's description:
> Updated AllowedUILocales to handle preferred languages.
>
> Updated AllowedUILocales to limit not only the ui locales but also the
> available preferred languages. Renamed AllowedUILocales to AllowedLanguages to
> better indicate that.
>
> Bug:  579660 
> Cq-Include-Trybots: luci.chromium.try:closure_compilation
> Change-Id: Iae929216e164fe941e5e335a3ce2e7ff47dce0e3
> Reviewed-on: https://chromium-review.googlesource.com/c/1256570
> Commit-Queue: Zakhar Voit <voit@google.com>
> Reviewed-by: Sergey Poromov <poromov@chromium.org>
> Reviewed-by: David Roger <droger@chromium.org>
> Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#597559}

Bug:  579660 ,  695042 
Change-Id: I5d499843fb500fa9d2852559dedc08adfd012da0
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Reviewed-on: https://chromium-review.googlesource.com/c/1280270
Commit-Queue: Zakhar Voit <voit@google.com>
Reviewed-by: Michael Martis <martis@chromium.org>
Reviewed-by: Alexander Hendrich <hendrich@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Sergey Poromov <poromov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603062}
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/chromeos/base/locale_util.cc
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/chromeos/base/locale_util.h
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/chromeos/locale_change_guard.cc
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/chromeos/login/session/user_session_manager.cc
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/chromeos/preferences.cc
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/chromeos/preferences.h
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.cc
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/policy/configuration_policy_handler_list_factory.cc
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/policy/policy_browsertest.cc
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/profiles/profile.cc
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/profiles/profile.h
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/profiles/profile_impl.cc
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/resources/settings/languages_page/add_languages_dialog.js
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/resources/settings/languages_page/languages.js
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/resources/settings/languages_page/languages_page.html
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/resources/settings/languages_page/languages_page.js
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/resources/settings/languages_page/languages_types.js
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/browser/ui/webui/settings/languages_handler.cc
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/common/extensions/api/language_settings_private.idl
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/common/pref_names.cc
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/common/pref_names.h
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/chrome/test/data/policy/policy_test_cases.json
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/components/language/core/common/locale_util.cc
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/components/language/core/common/locale_util.h
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/components/policy/resources/policy_templates.json
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/third_party/closure_compiler/externs/language_settings_private.js
[modify] https://crrev.com/1f16c5ebecfe3c5a374ea398cdd59e9b7a0e6a1a/tools/metrics/histograms/enums.xml

Sign in to add a comment