Giter Site home page Giter Site logo

Comments (2)

mdieudonne avatar mdieudonne commented on May 11, 2024

Hey,

Works nice on my side :

        locale: {
            code: customLocale,
            'Now': 'Aujourd\'hui',
            'X-Scale': 'Zoom',
            'Y-Scale': 'Interligne',
            'Task list width': 'Liste',
            'Before/After': 'Période',
            'Display task list': 'Liste'
        },

image

Using dayjs:

<script>
        dayjs.locale('fr');
        dayjs().locale('fr').format();
        // get locale object
        var customLocale = window.dayjs_locale_fr
</script>

from gantt-elastic.

neuronetio avatar neuronetio commented on May 11, 2024

@sandeepkumarmunige take a look at this example
You need to have header with sliders and labels to se translations for it.

You can also translate calendar dates as follows:

locale: {
  code:'fr',
  'Now': 'Aujourd\'hui',
  'X-Scale': 'Zoom',
  'Y-Scale': 'Interligne',
  'Task list width': 'Liste',
   'Before/After': 'Période',
   'Display task list': 'Liste',
  weekdays: 'Dimanche_Lundi_Mardi_Mercredi_Jeudi_Vendredi_Samedi'.split('_'),
  months: 'Janvier_Février_Mars_Avril_Mai_Juin_Juillet_Août_Septembre_Octobre_Novembre_Décembre'.split('_'),
  monthsShort: 'janv_févr_mars_avril_mai_juin_juil_août_sept_oct_nov_déc'.split('_'),
  relativeTime: {
    future: 'dans %s',
    past: 'il y a %s',
    s: 'quelques secondes',
    m: 'une minute',
    mm: '%d minutes',
    h: 'une heure',
    hh: '%d heures',
    d: 'un jour',
    dd: '%d jours',
    M: 'un mois',
    MM: '%d mois',
    y: 'un an',
    yy: '%d ans'
  },
  ordinal: (n) => {
    const o = n === 1 ? 'er' : ''
    return `${n}${o}`
  }
}

from gantt-elastic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.