Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Localization: when specify uiCulture in web.config, SignalR doesn't load the resource string for the specified locale #2077

Closed
Xiaohongt opened this Issue May 22, 2013 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

Xiaohongt commented May 22, 2013

Functional impact:
when specify uiCulture in web.config, SignalR doesn't load the resource string for the specified locale.

Repro:
1). you can download repro WebApplication1_loc.zip from below link on enu OS. https://skydrive.live.com/?cid=7230a11e3a3e316b&id=7230A11E3A3E316B%21455
2). in the repro app, it has zh-Hans (CHS) SignalR package installed and set uiCulture="zh-CN" in web.config
3). request myHub.html, click click "GetFailure" button
still see English error message: There was an error invoking Hub method

Actual Results:
it returns enu error message

Expected Results:
it return zh-Hans error message.

Note:
when in Startup change to EnableDetailedErrors true:
app.MapHubs(new HubConfiguration { EnableDetailedErrors = true});

Re-build the app, then we can see it return CHS error message

in source code HubDispatcher.cs ProcessResponse method, here are code for the two error messages:

 ......
                if (_enableDetailedErrors)
                {
                    var exception = error.InnerException ?? error;
                    hubResult.StackTrace = _isDebuggingEnabled ? exception.StackTrace : null;
                    hubResult.Error = exception.Message;
                }
                else
                {
                    hubResult.Error = String.Format(CultureInfo.CurrentCulture, Resources.Error_HubInvocationFailed, request.Hub, request.Method);
                }
....

@halter73 halter73 was assigned May 23, 2013

@Xiaohongt Xiaohongt was assigned Jun 7, 2013

Contributor

Xiaohongt commented Jun 8, 2013

verified

@Xiaohongt Xiaohongt closed this Jun 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment