- Home
- Forum
- ASP.NET Core - EJ 2
- Translating new appointment window
Translating new appointment window
Hello,

I already translated some parts of the schedule, but others don't.
I'm trying to translate the buttons of new appointment window with no success:
And this is my javascript so far:
document.addEventListener('DOMContentLoaded', function () {
var scheduleObject = document.getElementById('schedule').ej2_instances[0];
var L10n = ej.base.L10n;
L10n.load({
"pt": {
"schedule": {
"day": "Dia",
"week": "Semana",
"workWeek": "Semana de trabalho",
"month": "Mês",
"today": "Hoje"
},
"schedule-dialog": {
"save": "Salvar",
"cancel": "Cancelar"
},
"calendar": {
"today": "Hoje"
}
}
});
loadCultureFiles('pt');
scheduleObject.locale = 'pt';
});
I tried the name 'schedule-dialog' to find the correct name for the window, but it's not working.
Is there a place to find the names of the components for translation?
Can you guys help me?
Thank you very much.
SIGN IN To post a reply.
8 Replies
GP
Gregory Perozzo
December 7, 2018 12:00 PM UTC
Hello,

I got it. This is how I did it:
document.addEventListener('DOMContentLoaded', function () {
var scheduleObject = document.getElementById('schedule').ej2_instances[0];
var L10n = ej.base.L10n;
L10n.load({
"pt": {
"schedule": {
"day": "Dia",
"week": "Semana",
"workWeek": "Semana de trabalho",
"month": "Mês",
"today": "Hoje",
"saveButton": "Salvar",
"cancelButton": "Cancelar",
"deleteButton": "Remover",
"newEvent": "Novo agendamento de aula",
"editEvent": "Editar agendamento de aula",
"deleteEvent": "Remover agendamento",
"delete": "Remover",
"cancel": "Cancelar"
},
"calendar": {
"today": "Hoje"
}
}
});
loadCultureFiles('pt');
scheduleObject.locale = 'pt';
});
But now I need to translate another message. In the delete appointment window confirmation:
Can you help me, please?
FS
Florian Schwendtner
December 7, 2018 12:10 PM UTC
What about the "DeleteConfirmation"?
ReminderWindowTitle: "Fenêtre de rappel",
CreateAppointmentTitle: "créer un rendez-",
RecurrenceEditTitle: "Modifier répétition nomination",
RecurrenceEditMessage: "Comment voulez-vous changer le cas dans la série?",
RecurrenceEditOnly: "Seulement cette nomination",
RecurrenceEditSeries: "La série entière",
PreviousAppointment: "Nomination précédente",
NextAppointment: "prochain rendez-vous",
AppointmentSubject: "sujet",
StartTime: "Heure de début",
EndTime: "Heure de fin",
AllDay: "toute la journée",
Today: "aujourd'hui",
Recurrence: "répétition",
Done: "Terminé",
Cancel: "annuler",
Ok: "Ok",
RepeatBy: "Répétez par",
RepeatEvery: "répéter chaque",
RepeatOn: "répéter l'opération sur",
StartsOn: "démarre sur",
Ends: "extrémités",
Summary: "résumé",
Daily: "quotidien",
Weekly: "hebdomadaire",
Monthly: "mensuel",
Yearly: "annuel",
Every: "tous",
EveryWeekDay: "chaque jour de la semaine",
Never: "jamais",
After: "après",
Occurrence: "apparition",
On: "sur",
Edit: "Modifier",
RecurrenceDay: "Jour (s)",
RecurrenceWeek: "Semaine (s)",
RecurrenceMonth: "Mois (s)",
RecurrenceYear: "Année (s)",
The: "la",
OfEvery: "de chaque",
First: "première",
Second: "deuxième",
Third: "troisième",
Fourth: "quatrième",
Last: "dernier",
WeekDay: "jour de la semaine",
WeekEndDay: "Jour de week-end",
Subject: "sujet",
Categorize: "Catégories",
DueIn: "En raison",
DismissAll: "rejeter tout",
Dismiss: "rejeter",
OpenItem: "Ouvrir l'élément",
Snooze: "répétition",
Day: "jour",
Week: "semaine",
WorkWeek: "Semaine de travail",
Month: "mois",
AddEvent: "Ajouter événement",
CustomView: "Vue personnalisée",
Agenda: "ordre du jour",
Detailed: "détaillé",
EventBeginsin: "Nomination commence dans",
Editevent: "Modifier nomination",
Editseries: "Modifier série",
Times: "fois",
Until: "jusqu'à",
Eventwas: "rendez-vous était",
Hours: "hrs",
Minutes: "minutes",
Overdue: "en retard",
Days: "jour (s)",
Event: "Sujet",
Select: "sélectionner",
Previous: "prev",
Next: "suivant",
Close: "proche",
Delete: "effacer",
Date: "date",
Showin: "montrer en",
Gotodate: "Aller à la date",
Resources: "RESSOURCES",
RecurrenceDeleteTitle: "Supprimer répétition rendez-",
Location: "emplacement",
Priority: "priorité",
RecurrenceAlert: "alerte",
WrongPattern: "Le modèle de récurrence est pas valable",
CreateError: "La durée de la nomination doit être plus courte que la façon dont elle se produit fréquemment. Raccourcir la durée ou changer le modèle de récurrence dans la boîte de dialogue Récurrence de rendez.",
DragResizeError: "Impossible de replanifier une occurrence du rendez-vous récurrent. si elle saute sur une occurrence ultérieure du même rendez-vous.",
StartEndError: "L'heure de fin doit être supérieur à l'heure de début",
MouseOverDeleteTitle: "supprimer un rendez-",
DeleteConfirmation: "Êtes-vous sûr de vouloir supprimer ce rendez-vous?",
Time: "Temps"
GP
Gregory Perozzo
December 7, 2018 12:22 PM UTC
Hello Florian!

Already tried that before, but without success:
document.addEventListener('DOMContentLoaded', function () {
var scheduleObject = document.getElementById('schedule').ej2_instances[0];
var L10n = ej.base.L10n;
L10n.load({
"pt": {
"schedule": {
"day": "Dia",
"week": "Semana",
"workWeek": "Semana de trabalho",
"month": "Mês",
"today": "Hoje",
"saveButton": "Salvar",
"cancelButton": "Cancelar",
"deleteButton": "Remover",
"newEvent": "Novo agendamento de aula",
"editEvent": "Editar agendamento de aula",
"deleteEvent": "Remover agendamento",
"delete": "Remover",
"cancel": "Cancelar",
"deleteConfirmation": "xxxxxxxxxxxxxx"
},
"calendar": {
"today": "Hoje"
}
}
});
loadCultureFiles('pt');
scheduleObject.locale = 'pt';
});
GP
Gregory Perozzo
December 7, 2018 01:22 PM UTC
Just found the solution. And the string used is a lot different from the l10n file: https://github.com/syncfusion/ej-global/blob/master/l10n/ej.localetexts.pt-PT.js.

document.addEventListener('DOMContentLoaded', function () {
var scheduleObject = document.getElementById('schedule').ej2_instances[0];
var L10n = ej.base.L10n;
L10n.load({
"pt": {
"schedule": {
"day": "Dia",
"week": "Semana",
"workWeek": "Semana de trabalho",
"month": "Mês",
"today": "Hoje",
"saveButton": "Salvar",
"cancelButton": "Cancelar",
"deleteButton": "Remover",
"newEvent": "Novo agendamento de aula",
"editEvent": "Editar agendamento de aula",
"deleteEvent": "Remover agendamento",
"delete": "Remover",
"cancel": "Cancelar",
"deleteContent": "Tem certeza que deseja remover este agendamento?"
},
"calendar": {
"today": "Hoje"
}
}
});
loadCultureFiles('pt');
scheduleObject.locale = 'pt';
});
Example:
FS
Florian Schwendtner
December 7, 2018 01:57 PM UTC
Hi Gregory,
thats crazy :-)
I am working with syncfusion now for the last couple weeks and it turns out that we have to mix 30% of the new ejs/ej2 documentation with 30% of the old, a bit from JS and .net MVC... and the rest is up to us... just figure it out after hours of try&error and investigating all the javascript in google chrome :-D
Sorry for the wrong solution... but nice to know what it was... just for the future...
VD
Vinitha Devi Murugan
Syncfusion Team
December 7, 2018 04:18 PM UTC
Hi Gregory,
Thank your for contacting Syncfusion support.
Please find the below EJ2 culture local text files in the below link and refer the corresponding culture file in the sample to automatically convert the Schedule local words to the corresponding culture. We have prepared the below sample for your reference.
|
<script>
document.addEventListener('DOMContentLoaded', function () {
var scheduleObject = document.getElementById('schedule').ej2_instances[0];
loadCultureFiles('pt');
var ajax = new ej.base.Ajax('scripts/pt.json', 'GET', false);
ajax.onSuccess = function (value) {
ej.base.L10n.load(JSON.parse(value));
};
ajax.send();
ej.base.setCulture('pt');
});
function loadCultureFiles(name) {
var files = ['ca-gregorian.json', 'numbers.json', 'timeZoneNames.json'];
var loadCulture = function (prop) {
var val, ajax;
ajax = new ej.base.Ajax(location.origin + '/../scripts/cldr-data/main/' + name + '/' + files[prop], 'GET', false);
ajax.onSuccess = function (value) {
val = value;
};
ajax.send();
ej.base.loadCldr(JSON.parse(val));
};
for (var prop = 0; prop < files.length; prop++) {
loadCulture(prop);
}
}
</script> |
Regards,
M.Vinitha devi.
GP
Gregory Perozzo
December 7, 2018 05:45 PM UTC
Hey Florian!
Hours and hours of try&error... But, I think I have translated everything now.
Thanks a lot for your help!
KK
Karthigeyan Krishnamurthi
Syncfusion Team
December 10, 2018 05:44 AM UTC
SIGN IN To post a reply.
- 8 Replies
- 4 Participants
-
GP Gregory Perozzo
- Dec 6, 2018 11:40 AM UTC
- Dec 10, 2018 05:44 AM UTC