2
Vote

The editor doesn't switch language

description

The editor does not switch static localization strings when the language is changed by clicking the flag on language selector. The problematic place is on the line number 793 in file EditorProvider.vb:
 
Dim path As String = HttpContext.Current.Server.MapPath(_localeFile.ToLower.Replace(".resx", Locale & ".resx"))
 
Please remove leading dot from the first string parameter:
 
Dim path As String = HttpContext.Current.Server.MapPath(_localeFile.ToLower.Replace("resx", Locale & ".resx"))
 
This correction allows the intended functionality of function IsLocaleAvailable(). Thanks.
 
Correction:
Sorry, the solution published about is wrong. It doesn’t work for default language. However, this issue still exists in dnn version 6.0.1. Here is what works for me (C#, dnn version 6.0.1):
 
    private bool IsLocaleAvailable(string Locale)
    {
        string localeExt = String.Empty;
        if (Locale.ToLower() != "en-us")
        {
            localeExt = "." + Locale;
        }
 
        string path = HttpContext.Current.Server.MapPath(_localeFile.ToLower().Replace(".resx", localeExt + ".resx"));
        if (File.Exists(path))
        {
            return true;
        }
 
        return false;
    }

file attachments

comments

jernejp wrote Apr 21, 2011 at 12:15 PM

I don't know how to build source version of RadEditorProvider.

Can somebody write instruction how to build RadEditorProvider
i don't know where to find referenced : Bring2mind.DNN.Modules.DMX.Core.dll

or send me builded version with this change.
jernej at najdi dot net

Or can I just change vb file and put somewhere on server,
I don't know where I could put changed file?

wrote Apr 21, 2011 at 12:37 PM

wrote Apr 26, 2011 at 10:54 AM

jernejp wrote Apr 26, 2011 at 10:54 AM

I change an compile functions in EditorProvider.vb to work with Oliver Hine Advanced IconBar static localization or other Standard Control Panels, becouse "JanDr" solution don't work for me.
I use en-US and sl-SI locales.

Changes are in:
-RadEditor_Load
-IsLocaleAvailable

I attach changed EditorProvider.vb

jernejp wrote Apr 26, 2011 at 10:57 AM

PS:
Changes are for Advanced Ribbon bar.

wrote Sep 22, 2011 at 9:50 AM

wrote Feb 14, 2013 at 2:06 AM