Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
450
Problems with Localization of IgniteUI Controls
posted

Hello,

Firstable, thank you for the support and all the tutorials.

I have a problem with Ignite UI 2012.2 IgGrid for ASP.net MVC4 Razor, i´m not able to load the js resources for my Language Spanish.

I´m Following all the tutorials but unfortunately i dont achieve any results.

I´m doing the tutorials step by step, and actually i dont know if i´m missing something.

thanks in advance,

David Alonso.

Parents
  • 23953
    Verified Answer
    Offline posted

    Hello David,

    The easiest way to enable localization is to use the Infragistics Loader.

    When you use the Infragistics Loader you have 2 options:

    -To set the locale explicitly by setting the locale property of the loader. Here is an example code:

    @(Html.Infragistics()
    .Loader()
    .ScriptPath(Url.Content("http://cdn-na.infragistics.com/jquery/20122/latest/js/"))
    .CssPath(Url.Content("http://cdn-na.infragistics.com/jquery/20122/latest/css/"))
    .Locale("es")
    .Render())

    -To let the loader pick the correct locale based on the browser/OS regional settings by setting the autoDetectLocale option of the loader. Unfortunately the loader MVC wrapper is lacking that option, thus I've logged an internal bug (143955) which will be resolved with the next service release. In order to overcome this you should instantiate the loader in JavaScript directly. Here is an example code:

    @(Html.Infragistics().Loader().Render()) //this line of code is needed in order to overcome bug 143955

    $.ig.loader({
    scriptPath: "http://cdn-na.infragistics.com/jquery/20122/latest/js/",
    cssPath: "http://cdn-na.infragistics.com/jquery/20122/latest/css/",
    resources: "igGrid.Paging",
    autoDetectLocale: true
    });

    In case you don't use Infragistics Loader you have to manually include the *-es.js files from \js\modules\i18n folder.

    Hope this helps,
    Martin Pavlov
    Infragistics, Inc. 

Reply Children