We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Change Language of Gantt

Hi,

how can I change the language of my Syncfusion Gantt?

On the folder Scripts/Cultures I have some culture javascript files.

I want to use PT-BR (there is no avaliable).

How can I do it?

Thanks,
Otto Machado.

5 Replies

JR John Rajaram Syncfusion Team February 5, 2015 01:34 PM UTC

Hi Otto,

Thanks for using Syncfusion products.

We can change the localization of Gantt chart, with the help of “Locale” property along with corresponding "columnHeaderTexts" and “editDialogTexts” culture fileds.

Please refer the below code snippets for more details.

Code snippets:

@(Html.EJ().Gantt("Gantt").

   //...

   .Locale("pt-BR")

   .Datasource(ViewBag.dataSource)

 )

@(Html.EJ().ScriptManager())

<script>

       

      

        ej.Gantt.localization["pt-BR"] = {

            //string to display with dataSource contains 0 objects

            emptyRecord: "registro vazio",

            //headerText to be displayed in gridtree

            columnHeaderTexts: {

                taskId: "tarefa Id",

                taskName: "Nome da Tarefa",

                startDate: "Data De Início",

                endDate: "Data de Término",

                resourceInfo: "Informações de Recursos",

                duration: "duração",

                status: "estado",

                predecessor: "antecessor",

                baselineStartDate: "Data de início da linha de base",

                baselineEndDate: "Linha de Base End Date"

            },

            //string to display in dialog

            editDialogTexts: {

                addFormTitle: "Adicionar formulário Título",

                editFormTitle: "Editar Formulário Título",

                saveButton: "Salvar Botão",

                cancelButton: "Botão Cancelar"

            }

        }

      

    </script>

We have also prepared a sample based on this for your reference. Please find the sample in the following location:

Sample: http://www.syncfusion.com/downloads/support/directtrac/118142/MVC09NewSampleLocalization966466303.zip

 

At present in DELETE button of Edit dialog box, we are facing culture issue and hence we have logged an issue report on this. Also we have created a support incident under your account to track the status of this issue.

Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let us know if you require further assistance on this.

Regards,
John. R




OM Otto Moura Machado Filho replied to John Rajaram February 25, 2015 08:30 PM UTC

Hi Otto,

Thanks for using Syncfusion products.

We can change the localization of Gantt chart, with the help of “Locale” property along with corresponding "columnHeaderTexts" and “editDialogTexts” culture fileds.

Please refer the below code snippets for more details.

Code snippets:

@(Html.EJ().Gantt("Gantt").

   //...

   .Locale("pt-BR")

   .Datasource(ViewBag.dataSource)

 )

@(Html.EJ().ScriptManager())

<script>

       

      

        ej.Gantt.localization["pt-BR"] = {

            //string to display with dataSource contains 0 objects

            emptyRecord: "registro vazio",

            //headerText to be displayed in gridtree

            columnHeaderTexts: {

                taskId: "tarefa Id",

                taskName: "Nome da Tarefa",

                startDate: "Data De Início",

                endDate: "Data de Término",

                resourceInfo: "Informações de Recursos",

                duration: "duração",

                status: "estado",

                predecessor: "antecessor",

                baselineStartDate: "Data de início da linha de base",

                baselineEndDate: "Linha de Base End Date"

            },

            //string to display in dialog

            editDialogTexts: {

                addFormTitle: "Adicionar formulário Título",

                editFormTitle: "Editar Formulário Título",

                saveButton: "Salvar Botão",

                cancelButton: "Botão Cancelar"

            }

        }

      

    </script>

We have also prepared a sample based on this for your reference. Please find the sample in the following location:

Sample: http://www.syncfusion.com/downloads/support/directtrac/118142/MVC09NewSampleLocalization966466303.zip

 

At present in DELETE button of Edit dialog box, we are facing culture issue and hence we have logged an issue report on this. Also we have created a support incident under your account to track the status of this issue.

Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let us know if you require further assistance on this.

Regards,
John. R



Hi,

It's work thanks, but how can i change the predecessors fields from GanttEditor

Regards,
Otto Machado

Attachment: EditGantt_cdb3c133.rar


JR John Rajaram Syncfusion Team February 26, 2015 06:37 AM UTC

Hi Otto,

We regret for the inconvenience caused.

We were able to reproduce the issue in localization of predecessor fields and we have confirmed this as bug and logged a report on this. Also we have created a support incident under your account to track the status of this issue.

Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

 Please let us know if you require further assistance on this.

Regards,
John. R




CM Cristina Martinez November 11, 2019 08:22 PM UTC

where should I place this piece of code? I can't change the language


PP Pooja Priya Krishna Moorthy Syncfusion Team November 12, 2019 09:38 AM UTC

Hi Cristina, 

We have prepared an ASP.NET Webforms sample by changing the culture as es-ES. This can be achieved by using the property Locale and referring the necessary script files. Please find the below code example. 
 
<head runat="server"> 
    //... 
    <script src="Scripts/Culture/ej.culture.es-ES.js"></script> 
    <script src="Scripts/Culture/ej.localetexts.es-ES.js"></script> 
</head> 
<body> 
    <ej:Gantt ID="GanttContainer" ClientIDMode="Static" runat="server" Locale="es-ES">  
     </ej:Gantt> 
</body> 


Please refer the below documentation link to know more about localization. 
You can find the culture script files and locale text of Gantt from below link. 

Please get back to us if you require further assistance on this. 

Regards, 
Pooja Priya K. 
 


Loader.
Live Chat Icon For mobile
Up arrow icon