TimelineKit

Localization

Translate every user-facing string — column headers, tooltips, constraint labels, warnings, and more. TimelineKit ships with 14 built-in locales and makes it easy to create your own.

All examples use gantt as shorthand for the component instance — i.e. ref.current in React or this.ganttChart in Angular.

Quick Start

Import a built-in locale and assign it to the component. The UI updates immediately.

App.tsx
import { useRef, useEffect } from 'react';
import { GanttChart, GanttChartRef, deLocale } from '@timelinekit/react';

export default function App() {
  const ref = useRef<GanttChartRef>(null);

  useEffect(() => {
    ref.current!.locale = deLocale;
  }, []);

  return <GanttChart ref={ref} />;
}

Built-in Locales

All locales are exported from @timelinekit/core and re-exported by the wrapper packages (@timelinekit/react and @timelinekit/angular). English (enLocale) is the default.

enLocaleEnglish (en-US) — default
csLocaleCzech (cs-CZ)
deLocaleGerman (de-DE)
esLocaleSpanish (es-ES)
frLocaleFrench (fr-FR)
itLocaleItalian (it-IT)
jaLocaleJapanese (ja-JP)
koLocaleKorean (ko-KR)
nlLocaleDutch (nl-NL)
plLocalePolish (pl-PL)
ptLocalePortuguese (pt)
ruLocaleRussian (ru-RU)
svLocaleSwedish (sv-SE)
zhLocaleChinese Simplified (zh-CN)
import { frLocale } from '@timelinekit/core';

gantt.locale = frLocale;

You can switch locales at runtime — the component re-renders with the new strings immediately.

Locale Structure

A locale implements the TimelineKitLocale interface. It is organized into logical groups:

Language Tag

language: stringBCP 47 language tag (e.g. 'en-US', 'de-DE'). Used by the browser's Intl API for date and number formatting.

Column Headers

Labels for the sheet (data grid) column headers.

columns.nameTask name column. Default: 'Name'.
columns.lengthDuration column. Default: 'Length'.
columns.startStart date column. Default: 'Start'.
columns.endEnd date column. Default: 'End'.
columns.progressProgress column. Default: 'Progress'.
columns.resourcesResources column. Default: 'Resources'.
columns.workWork column. Default: 'Work'.
columns.costCost column. Default: 'Cost'.

Tooltips

Tooltip text shown when users interact with the chart (drag, resize, connect tasks).

tooltips.addTask'Add task'
tooltips.addTaskPart'Add task part'
tooltips.moveTask'Move task'
tooltips.moveTaskPart'Move task part'
tooltips.resizeTask'Resize task'
tooltips.resizeTaskPart'Resize task part'
tooltips.moveMilestone'Move milestone'
tooltips.setProgress'Set progress'
tooltips.addLink'Add a link'

Column tooltips provide explanatory text for the Work and Cost columns:

columnTooltips.workExplanation shown when hovering the Work column header.
columnTooltips.costExplanation shown when hovering the Cost column header.

Labels

Short labels used in task detail tooltips and link info panels.

labels.start'Start'
labels.end'End'
labels.length'Length'
labels.progress'Progress'
labels.from'From' — link source label.
labels.to'To' — link target label.
labels.type'Type' — link type label.
labels.lag'Lag' — link lag label.

Constraint Labels

Human-readable names for task constraint types. Maps each ConstraintType to a translated string.

constraints.asap'As Soon As Possible'
constraints.alap'As Late As Possible'
constraints.mso'Must Start On'
constraints.mfo'Must Finish On'
constraints.snet'Start No Earlier Than'
constraints.snlt'Start No Later Than'
constraints.fnet'Finish No Earlier Than'
constraints.fnlt'Finish No Later Than'

Warning Messages

Messages displayed when tasks are behind schedule or violate constraints. Some entries are functions that receive dynamic values.

warnings.behindSchedule'The task is behind schedule'
warnings.behindScheduleByOneDay'by one day'
warnings.behindScheduleByDays(days)Function returning e.g. 'by 5 days'.
warnings.constraintViolation(label, date)Function returning e.g. "Task violates 'Must Start On 2025-01-15' constraint".

Export Labels

Sheet/tab names used when exporting to Excel or CSV.

export.tasksSheetName'Tasks'
export.linksSheetName'Links'
export.resourcesSheetName'Resources'
export.eventsSheetName'Events'
export.calendarsSheetName'Calendars'

Resource Scheduler Labels

Labels used by the Resource Scheduler component. Shared via the same locale object.

scheduler.resource'Resource'
scheduler.name'Name'
scheduler.type'Type'
scheduler.addEvent'Add event'
scheduler.moveEvent'Move event'
scheduler.resizeEvent'Resize event'

Event Calendar Labels

Labels used by the Event Calendar component. Shared via the same locale object.

calendar.today'Today'
calendar.month'Month'
calendar.week'Week'
calendar.day'Day'
calendar.agenda'Agenda'
calendar.allDay'all-day'
calendar.noEvents'No events'
calendar.more(count)Function returning e.g. '+3 more'.
calendar.myCalendars'My Calendars'
calendar.addCalendar'Add calendar'

The calendar group also includes optional ARIA accessibility labels (ariaCalendar, ariaSidebar, ariaNavigation, etc.) and optional week number labels (weekNumberShort, weekNumber). English fallbacks are used when omitted.

Custom Locale

Create a fully custom locale by implementing the TimelineKitLocale interface. You can also spread an existing locale and override only specific fields.

import { enLocale, TimelineKitLocale } from '@timelinekit/core';

// Override specific strings
const myLocale: TimelineKitLocale = {
  ...enLocale,
  language: 'en-GB',
  columns: {
    ...enLocale.columns,
    length: 'Duration',
    resources: 'Assignees',
  },
  tooltips: {
    ...enLocale.tooltips,
    addTask: 'New task',
    addLink: 'Create dependency',
  },
};

gantt.locale = myLocale;

Date Formatting

Dates are formatted using the browser's Intl.DateTimeFormat API with the language tag from your locale. This means dates automatically follow the conventions of the selected language — day/month order, month names, separators, and more.

For example, January 15, 2025 renders as:

en-US1/15/2025
de-DE15.1.2025
ja-JP2025/1/15
cs-CZ15. 1. 2025

No additional configuration is needed — just set the correct language tag and the browser handles the rest.

Custom Date Parser

The optional dateParser function lets you define how user-typed date strings in the sheet are interpreted. It receives the raw input and should return a Date object or null if the input is invalid.

import { enLocale, TimelineKitLocale } from '@timelinekit/core';

const locale: TimelineKitLocale = {
  ...enLocale,
  // Parse DD/MM/YYYY format
  dateParser: (value: string) => {
    const parts = value.split('/');
    if (parts.length !== 3) return null;
    const [day, month, year] = parts.map(Number);
    const date = new Date(year, month - 1, day);
    return isNaN(date.getTime()) ? null : date;
  },
};

gantt.locale = locale;

If dateParser is not provided, the component falls back to the browser's default Date parsing.

Full Example

A complete custom locale for Turkish:

import type { TimelineKitLocale } from '@timelinekit/core';

const trLocale: TimelineKitLocale = {
  language: 'tr-TR',

  columns: {
    name: 'Ad',
    length: 'Süre',
    start: 'Başlangıç',
    end: 'Bitiş',
    progress: 'İlerleme',
    resources: 'Kaynaklar',
    work: 'İş',
    cost: 'Maliyet',
  },

  columnTooltips: {
    work: 'Bu göreve ayrılan iş günleri veya saatler.',
    cost: 'Kaynak atandığında otomatik hesaplanan maliyet.',
  },

  tooltips: {
    addTask: 'Görev ekle',
    addTaskPart: 'Görev parçası ekle',
    moveTask: 'Görevi taşı',
    moveTaskPart: 'Görev parçasını taşı',
    resizeTask: 'Görevi boyutlandır',
    resizeTaskPart: 'Görev parçasını boyutlandır',
    moveMilestone: 'Kilometre taşını taşı',
    setProgress: 'İlerlemeyi ayarla',
    addLink: 'Bağlantı ekle',
  },

  labels: {
    start: 'Başlangıç',
    end: 'Bitiş',
    length: 'Süre',
    progress: 'İlerleme',
    from: 'Kaynak',
    to: 'Hedef',
    type: 'Tür',
    lag: 'Gecikme',
  },

  constraints: {
    asap: 'En Kısa Sürede',
    alap: 'En Geç',
    mso: 'Şu Tarihte Başlamalı',
    mfo: 'Şu Tarihte Bitmeli',
    snet: 'Şu Tarihten Önce Başlamamalı',
    snlt: 'Şu Tarihten Sonra Başlamamalı',
    fnet: 'Şu Tarihten Önce Bitmemeli',
    fnlt: 'Şu Tarihten Sonra Bitmemeli',
  },

  linkTypes: {
    finishToStart: 'Bitiş → Başlangıç',
    startToStart: 'Başlangıç → Başlangıç',
    finishToFinish: 'Bitiş → Bitiş',
    startToFinish: 'Başlangıç → Bitiş',
  },

  warnings: {
    behindSchedule: 'Görev planın gerisinde',
    behindScheduleByOneDay: 'bir gün',
    behindScheduleByDays: (days) => `${days} gün`,
    constraintViolation: (label, date) =>
      `Görev '${label} ${date}' kısıtlamasını ihlal ediyor`,
  },

  export: {
    tasksSheetName: 'Görevler',
    linksSheetName: 'Bağlantılar',
    resourcesSheetName: 'Kaynaklar',
    eventsSheetName: 'Etkinlikler',
    calendarsSheetName: 'Takvimler',
  },

  scheduler: {
    resource: 'Kaynak',
    name: 'Ad',
    type: 'Tür',
    addEvent: 'Etkinlik ekle',
    moveEvent: 'Etkinliği taşı',
    resizeEvent: 'Etkinliği boyutlandır',
  },

  calendar: {
    today: 'Bugün',
    month: 'Ay',
    week: 'Hafta',
    day: 'Gün',
    agenda: 'Ajanda',
    allDay: 'tüm gün',
    noEvents: 'Etkinlik yok',
    more: (count) => `+${count} daha`,
    myCalendars: 'Takvimlerim',
    addCalendar: 'Takvim ekle',
  },
};

gantt.locale = trLocale;