Open Closed

Problem with adding Localization file. #235


0
julian created

Hi!

I just tried to add a localization xml file, I changed the current default localization filename to sitename-en.xml and named the new xml file to just* sitename*.xml. Then I added the language in the webmodule.cs just as described + setting it to true.

See below: <span style="color:#0000FF">_public override void PreInitialize() { //Add/remove languages for your application Configuration.Localization.Languages.Add(new LanguageInfo("sv-SE", "Swedish", "famfamfam-flag-sv", true)); Configuration.Localization.Languages.Add(new LanguageInfo("en", "English", "famfamfam-flag-gb"));

        //Configure navigation/menu
        Configuration.Navigation.Providers.Add&lt;AppNavigationProvider&gt;();
    }_&lt;/span&gt;

Problem: When I run the application I get the following message:

<span style="color:#BF0000">_An exception of type 'Abp.AbpInitializationException' occurred in Abp.dll but was not handled in user code

Additional information: There should be a default localization dictionary for source: SiteName_</span>

Anyone know how to fix this? I cant find where I set a Localization-file to default :/

Mvh Julian


2 Answer(s)
  • 0
    hikalkan created
    Support Team

    Hi,

    Have you marked your new localization XML file as embedded resource?

  • 0
    julian created

    Solved! Yes, I marked it as embedded but used the wrong key, I used sv-SE instead of just sv...

    My bad! Thanks anyway!

    /Julian