Skip to content

Add i18n support #523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

tirinnovo
Copy link

@tirinnovo tirinnovo commented Mar 22, 2025

This commit is to allow adding supported or custom translations, e.g.

import Gantt from 'frappe-gantt';

const gantt = new Gantt('#gantt', tasks, {
  language: 'it', // or 'it-IT'
});

You can also create your own translations:

import Gantt from 'frappe-gantt';

const myEoLocale = {
  Mode: 'Modo',
  Today: 'Hodiaŭ',
  Year: 'Jaro',
  // ...
};

const gantt = new Gantt('#gantt', tasks, {
  language: 'eo',
  locales: {
    'eo': myEoLocale,
  },
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant