• Home
  • knowledge base
  • Support
    • Submit Ticket
  • Support Policy
  • Hire Us
  • Home
  • knowledge base
  • Support
    • Submit Ticket
  • Support Policy
  • Hire Us
home/Knowledge Base/BeautyPress HTML/Beautypress HTML template datepicker language change
Popular Search:Getting Started

Beautypress HTML template datepicker language change

486 views 6 Feb 12, 2018 Updated on Jul 5, 2021 admin

So we took “fr” translation from here

https://github.com/uxsolutions/bootstrap-datepicker/tree/master/js/locales

And go to js/main.js and Search datepicker

You will see something like

if ( $( ‘.datepicker’ ).length > 0 ) { $( ‘.datepicker’ ).datepicker( ).on( ‘changeDate’, function( ) { $( this ).datepicker( ‘hide’ ); } ); }

Replace this with this one

First, add the locale’s code before the initialization. and in the initialization add an option like language: ‘fr’

.datepicker({language: ‘fr’} )

 

 

The whole code will look like this.

 

$.fn.datepicker.dates[‘fr’] = { days: [“dimanche”, “lundi”, “mardi”, “mercredi”, “jeudi”, “vendredi”, “samedi”], daysShort: [“dim.”, “lun.”, “mar.”, “mer.”, “jeu.”, “ven.”, “sam.”], daysMin: [“d”, “l”, “ma”, “me”, “j”, “v”, “s”], months: [“janvier”, “février”, “mars”, “avril”, “mai”, “juin”, “juillet”, “août”, “septembre”, “octobre”, “novembre”, “décembre”], monthsShort: [“janv.”, “févr.”, “mars”, “avril”, “mai”, “juin”, “juil.”, “août”, “sept.”, “oct.”, “nov.”, “déc.”], today: “Aujourd’hui”, monthsTitle: “Mois”, clear: “Effacer”, weekStart: 1, format: “dd/mm/yyyy” }; if ( $( ‘.datepicker’ ).length > 0 ) { $( ‘.datepicker’ ).datepicker({language: ‘fr’} ).on( ‘changeDate’, function( ) { $( this ).datepicker( ‘hide’ ); } ); }

More details about translation please follow this. https://bootstrap-datepicker.readthedocs.io/en/stable/i18n.html

 

Hope it helps 🙂

Thanks

Was this helpful?

6 Yes  No

Didn't find your answer? Contact Us

New title
  • Archer
  • Beautypress
  • BeautyPress HTML
  • Blo
  • Car Rental
  • Doors
  • Elementor
  • Evenex
  • Gemvast
  • General
  • Getleads
  • hostinza
  • Marketo
  • WellnessCenter
  • WordPress
New title
  • How to Extend/Renew your Support Period?
  • View phpinfo() in WordPress
  • Theme translation with Poedit and Loco Translate Plugin
  • How to install WordPress
  • Use Child Theme instead of Parent Theme
  • © 2016 XpeedStudio.com. All Rights Reserved. Privacy Policy | Terms of Use

Popular Search:Getting Started