Jquery UI Localization

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
11/14/2011 4:53:51 AM
Gravatar
Total Posts 88

Jquery UI Localization

Hi,

I´m using jquery UI plugins like datepicker and i need to use 'pt-PT' languages. I have the translation file ui.datepicker-pt.js on clienteScript/jqueryui182 folder and onInit  i load this js file. On aspx page on documentReady i use $.datepicker.setDefaults($.datepicker.regional['<language>']);. but nothing happens.

can you help me with that

 

11/14/2011 5:03:14 AM
Gravatar
Total Posts 88

Re: Jquery UI Localization

ok,

i´ve solved the problem including this function on aspx page

$(function () {
        $.datepicker.setDefaults($.datepicker.regional['pt-PT']);       
        $("#leftdatepicker").datepicker();
    });

to make this on default control how can i have the laguage attribute on aspx to set

var languageVariable = ???

$(function () {
        $.datepicker.setDefaults($.datepicker.regional[languageVariable]);      
        $("#leftdatepicker").datepicker();
    });

11/14/2011 7:45:39 AM
Gravatar
Total Posts 18439

Re: Jquery UI Localization

I'm glad you found a solution. Our wrapper control for jquery datepicker automatically adjusts to supported languages, it would work automatically with pt-BR but as far as I know pt-PT is not included in jquery ui so if you have a custom language file then you would need to use it the way you have done it. 

The list of supported languages included with jquery ui can be found here.

Those are the language codes we automatically adapt to from server side code. Maybe you can contribute your pt.js file to the jquery ui project.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.