question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

language option not working

See original GitHub issue

When using the calendar options, the language tag only works for the language “en” (at least for me, it did). I fixed it by manually adding the “de” language into the jsCalendar.js file.

HTML <div id="my-calendar"></div>

JS

var element = document.getElementById("my-calendar");
    // Create the calendar
    var myCalendar = jsCalendar.new({
        target : element,
        navigator : true,
        navigatorPosition : "right",
        zeroFill : true,
        monthFormat : "month",
        dayFormat : "DD",
        language : "de"
    });

   // Languages
    JsCalendar.prototype.languages = {
        // Default English language
        en : {
            // Months Names
            months : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
            // Days Names
            days : ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
            // Default handlers
            _dateStringParser : function(key, date) {return JsCalendar._defaultDateStringParser(key, date, this);},
            _dayStringParser : function(key, date) {return JsCalendar._defaultDayStringParser(key, date, this);}
        },
        //manually added the german language here
        de : {
            // Months Names
            months : ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
            // Days Names
            days : ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
            // Default handlers
            _dateStringParser : function(key, date) {return JsCalendar._defaultDateStringParser(key, date, this);},
            _dayStringParser : function(key, date) {return JsCalendar._defaultDayStringParser(key, date, this);}
        },
    };`

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mhollebecqcommented, Aug 28, 2020

Hello I have also the same probleme with french language. When trying to follow a route, I have : -jsCalendar.lang.fr.js file exectued, successfully call jsCalendar.addLanguage({code : 'fr',... -Using “DOMContendLoaded” event call back, jsCalendar.new({language: "fr",...}) called -JsCalendar.addLanguage(...) asynchronously called in jsCalendar.js file…but to late

1reaction
GramThanoscommented, Jan 21, 2020

I will test it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Language Bar Missing from Taskbar (Windows 10 ...
Method 1. Enable Language Bar from Control Panel. · Then select the Language Bar tab and make sure that the "Docked in the...
Read more >
Windows 10 Language Bar is missing - Microsoft Community
To do this, press the Windows+I shortcut to open Settings and click on Time & Language. Under Region & language, you can delete...
Read more >
Top 5 Fixes for Language Bar Missing in Windows 10
1. Unhide It. It is possible that the language bar is hidden. Microsoft has not made it easy to discover the setting for...
Read more >
Restore: Language Bar missing in Windows 11/10
In Windows 11, open Settings > Time & language > Advanced keyboard settings. Click on Language bar option and a new Test Services...
Read more >
Cannot Remove a Language from Windows 10 (Fix) - Appuals
You may fail to remove a language from your system if the regional & language settings of your system are not properly configured....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found