vtfuture / BForms

Bootstrap Forms for ASP.NET MVC
MIT License
62 stars 33 forks source link

Deployment on (non english server) localization issues? #238

Closed meister-d closed 9 years ago

meister-d commented 9 years ago

Hi Guys we have deployed a solution based on BForms on a German localized server. Some of the Controls seems to be broken, and the Waiting indicator is allways turning.

We have traced this behaviour with fiddler and have constated that there were some files missing:

As a Quick Fix we have created the corresponding files and have added them to the RequiresJS.json file.

"validate-de": "bforms/plugins/validation/i18n/bforms.validate-de",
"select2-de": "bforms/plugins/select2/js/i18n/select2-de",

It seems, that also the Datepicke gets broken if there are languages missing: for this purpose I added a "fake" german counterpart ;-)

 $.fn.bsDatepickerLang = {
        'en': {
            nowText: 'Now',
            setDateText: 'Set date',
            setTimeText: 'Set time'
        },
        'ro': {
            nowText: 'Acum',
            setDateText: 'Setează data',
            setTimeText: 'Setează ora'
        },
        'de': {
            nowText: 'Now',
            setDateText: 'Set date',
            setTimeText: 'Set time'
        }
    };

What is the best way to do localisation with Bforms? Is it possible to configure a Timeout for the waiting indicator (in general for the Ajax operations)?

Regards Dumitru (aka Meister-D)

mariuscosareanu commented 9 years ago
$.fn.bsDatepickerLang['en'] = {
      nowText: 'Now',
            setDateText: 'Set date',
            setTimeText: 'Set time'
        };