<script type="text/javascript">
$(function () {
$("#GanttContainer").ejGantt({
locale: "pl-PL",
});
});
ej.Gantt.Locale["pl-PL"] = {
durationUnitTexts: {
days: "dni",
hours: "godzin",
minutes: "minuty"
},
};
</script> |
Hi Karol,Thanks for contacting Syncfusion support.By using the “locale” property, we can render the Gantt with different culture.We have prepared the sample to render Gantt in “pl-PL” culture. By using the “durationUnitTexts” localized text we can translate the duration units as per our requirement.Please find the code snippet to customize the Gantt with localized texts below:
<script type="text/javascript">$(function () {$("#GanttContainer").ejGantt({locale: "pl-PL",});});ej.Gantt.Locale["pl-PL"] = {durationUnitTexts: {days: "dni",hours: "godzin",minutes: "minuty"},};</script>You can also find the culture files from Essential Studio installed location below:Location:C:\Users\AppData\Local\Syncfusion\EssentialStudio\14.2.0.28\JavaScript\assets\scripts\i18nPlease refer the below link to get the localized texts for EJ controls:We have also prepared the sample for your reference please find the sample from below location:Please let us know if you require further assistance on this.
Regards,
Jone sherine P S
<div id="GanttContainer" style="height:450px;width:100%"></div>
<button onclick="hide()" style="position:relative;top:10px">Hide Column</button>
<script type="text/javascript">
$(function () {
$("#GanttContainer").ejGantt({
locale: "pl-PL",
});
});
ej.Gantt.Locale["pl-PL"] = {
columnHeaderTexts: {
taskId: "ID",
taskName: "Nazwa zadania",
startDate: "Data rozpoczęcia",
endDate: "Data końcowa",
resourceInfo: "Zasoby",
duration: "Trwanie",
status: "Postęp",
predecessor: "Przodkowie",
type: "Rodzaj",
offset: "Offsetowy",
baselineStartDate: "Baseline Data rozpoczęcia",
baselineEndDate: "Baseline Data zakończenia",
WBS: "WBS",
WBSpredecessor: "WBS poprzednik"
},
};
function hide() {
var ganttObj = $("#GanttContainer").data("ejGantt");
//To hide the required column
ganttObj.hideColumn("Data rozpoczęcia");
}
</script> |