362
Views
4
Comments
Calendar set to local language
Question

Hi,

I have the following issue:
The Calendar extension of Silk UI for mobile does not register the current locale. When using the app on a Dutch device it still displays months in default English.


I have tried to change config of the extension using following javascript code in the On render action of the screen which loads the calendar.


$( document ).ready( function() {
    var newi18n = {
        previousMonth : 'Vorige Maand',
        nextMonth     : 'Volgende Maand',
        months        : ['Januari','Februari','Maart','April','Mei','Juni','Juli','Augustus','September','Oktober','November','December'],
        weekdays      : ['Zondag','Maandag','Dinsdag','Woensdag','Donderdag','Vrijdag','Zaterdag'],
        weekdaysShort : ['Zo','Ma','Di','Wo','Do','Vr','Zat']
    }
   
    var field = document.getElementById('DatePicker');
    picker = new Pikaday({
            field: field,
            i18n: newi18n
    });
});

2018-08-27 08-29-35
Fábio Vaz

Hi,


The input advancedFormat need to be filled with 


i18n : {
        previousMonth : 'Vorige Maand',
        nextMonth     : 'Volgende Maand',
        months        : ['Januari','Februari','Maart','April','Mei','Juni','Juli','Augustus','September','Oktober','November','December'],
        weekdays      : ['Zondag','Maandag','Dinsdag','Woensdag','Donderdag','Vrijdag','Zaterdag'],
        weekdaysShort : ['Zo','Ma','Di','Wo','Do','Vr','Zat']
    }

}



   

2018-03-29 04-39-43
Johnny B Good

Thanks for the reply, but in my version of SilkUI Mobile Patterns (The latest version) there is no param AdvancedFormat.

2018-08-27 08-29-35
Fábio Vaz

Hi,


this is my version: 

Silk UI Mobile, a beautiful UI Framework for native-like experience on mobile devices

Version 1.6.1

silkui.outsystems.com

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Johnny,

Note that there is no concept of "locale" in OutSystems Mobile. So there's also no "registering" the locale.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.