question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Localization feature problem for non-English browsers

See original GitHub issue

Hi, We’ve upgraded to version 2.4.4720.0005 and ran into a problem with the localization feature https://github.com/neos-sdi/adfsmfa/wiki/09-Localization. We also upgraded to 2.4.4720.0011 and it has the same problem.

The localization works good with the default browser/OS language set to English. When we have another language set we get different results. (We only have English resource files for the localization, so other languages should default back to the English resource files.)

It sometimes works, and it defaults back to the English customized text we have. But sometimes it does not, and the browser then ends up in a loop after typing username and password not moving forward to the MFA “Enter Code” page.

It seems like this happens when the browser sets the html language attribute to something that is not in this list https://github.com/neos-sdi/adfsmfa/commit/f3bd6c5246bcd5c78dcc1f0c2632fb56de905822 For example, my Google Chrome sets lang=sv, and then the MFA works, while my Edge browser sets lang=sv-SE and then I end up in the loop and are not prompted for MFA. We also got the same problem in Google Chrome when the browser sets lang=nl-NL.

When this problem occur we get this error log in the ADFS event log.

Encountered error during federation passive request.

Additional Data

Protocol Name: Saml

Relying Party: rp.domain.com

Exception details: System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture (or the neutral culture) on disk. baseName: Neos.IdentityServer.MultiFactor.Resources.STitle locationInfo: <null> fileName: Neos.IdentityServer.MultiFactor.Resources.STitle.resources at System.Resources.FileBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark) at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark) at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) at System.Resources.ResourceManager.GetString(String name, CultureInfo culture) at Neos.IdentityServer.MultiFactor.ResourcesLocale.GetString(ResourcesLocaleKind kind, String name) at Neos.IdentityServer.MultiFactor.BasePresentation.GetPageTitle(Int32 lcid) at Neos.IdentityServer.MultiFactor.AdapterPresentation.GetPageTitle(Int32 lcid) at Microsoft.IdentityServer.Web.UI.CustomAuthenticationPage.get_PageTitle() at Microsoft.IdentityServer.Web.UI.PageBase.ApplyTheme(String template) at Microsoft.IdentityServer.Web.UI.PageBase.GetPageHtml() at Microsoft.IdentityServer.Web.UI.PageBase.Render() at Microsoft.IdentityServer.Web.Authentication.External.ExternalAuthenticationHandler.Process(ProtocolContext context) at Microsoft.IdentityServer.Web.Authentication.AuthenticationOptionsHandler.Process(ProtocolContext context) at Microsoft.IdentityServer.Web.PassiveProtocolListener.OnGetContext(WrappedHttpListenerContext context)

When we remove the customized localize resource files the default text works from any html language attribute.

Could this be a bug?

Kind regards, Andreas

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
redhook62commented, Oct 1, 2019

Hi,

If it works, keep it.

If am surprised that only with resources en-US it does not work (without en only). It should be tested by removing the “en” version, to see if the default applies to all languages.

I confirm that we will remove the version en only in future versions, while allowing the versions en-US.

Regards

0reactions
anorstromcommented, Oct 1, 2019

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 Website Localization Issues to Avoid
Localization has huge benefits, but it's a challenging task. We take a look at the top 5 website localization issues to avoid, ...
Read more >
Why does Google use location for language rather than ...
The official reason was that a lot of browsers defaulted to en-US, so Google effectively treats an Accept-Language of en-US as a no-op,...
Read more >
10 Key Localization Mistakes, and How to Avoid Them
Save yourself the trouble with this ultimate list of localization best practices and avoid the most common mistakes from the start.
Read more >
How should web sites deal with localization settings? (from ...
The solution here is so simple, it's annoying that dev's do anything else. Respect the browser setting. If it says English then by...
Read more >
9 biggest localization issues developers face (+ how to ...
1. Synchronizing translations between TMS and code repository ; 2. Automatically downloading new translations and monitoring for changes ; 3.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found