Problem With Localization


Author
Message
Luiz Carneiro Lima
Luiz Carneiro Lima
StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)
Group: Forum Members
Posts: 25, Visits: 87
Ok, thanks for the hint!
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
There is a more efficient option to choosing the language as well:

System.Globalization.CultureInfo.CurrentCulture.LCID

The GetActiveLanguage() can sometimes take a while to return since it uses the DataTable XML serialization for the encrypted XML file that is stored in the application data.  We use the LCID property of the CurrentCulture within our applications so that the language is chosen by the region setting the user has set up in the Control Panel within Windows.

You'll also want to put a Select Case right after getting the locale ID just in case your application is not localized in the language that is chosen (or you might get an exception thrown).  This is what we do within the security editor:

        '-- Configure the localization information
        Select Case System.Globalization.CultureInfo.CurrentCulture.LCID
            Case 1031, 3079
                '-- German (Germany)
                Localization.MessageLocaleID = 1031

            Case 1036, 3084
                '-- French (France)
                Localization.MessageLocaleID = 1036

            Case 1040
                '-- Italian (Italy)
                Localization.MessageLocaleID = 1040

            Case 1046, 2070
                '-- Portuguese Brazil
                Localization.MessageLocaleID = 1046

            Case 1049
                '-- Russian (Russia)
                Localization.MessageLocaleID = 1049

            Case 2058, 11274
                '-- Spanish (Mexico)
                Localization.MessageLocaleID = 2058

            Case Else
                '-- English (USA)
                Localization.MessageLocaleID = 1033
        End Select

Luiz Carneiro Lima
Luiz Carneiro Lima
StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)
Group: Forum Members
Posts: 25, Visits: 87
I resolved the problem. The problem that I was having was that I was not placing the correct MessageLocaleID.

Localization.MessageLocaleID = Localization.GetActiveLanguage();

Now its works, thanks.

Luiz Carneiro Lima
Luiz Carneiro Lima
StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)
Group: Forum Members
Posts: 25, Visits: 87
Hi,

I saw in a part of the Help that it has to configure in the "Solution Preferences" the fields of the 'Localization Preferences', but when I select in the menu Strataframe/Solution Preferences does not open the window of preferences. Nothing does happen.

I until already restarted the system, I initiated a new project… But still thus it does not appear the window “Solution Preferences”...

You can Help me?

Thanks!

Luiz Carneiro Lima
Luiz Carneiro Lima
StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)
Group: Forum Members
Posts: 25, Visits: 87
I created a project in the Localization & Messaging Editor. I generated the xml archive, I created the folder Localization Files in the Visual Studio and added generated archives in XML. In the guide properties I modified the Build Action for "Embedded Resource".

In the InnitApplication I configured the code:
MicroFour.StrataFrame.UI.Localization.MessageLocaleID = MicroFour.StrataFrame.UI.Localization.GetActiveLanguage (“Customer”);

When I select label and I give a click in key in the properties appears the following message of error:

Implicit conversion from data type text to nvarchar is not allowed. Use the CONVERT function to run this query.

They can help me?

Thanks.

Angela

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search