nhn / toast-ui.vue-calendar

Toast UI Calendar for Vue
MIT License
195 stars 54 forks source link

Translate plugin #49

Closed maria1186 closed 3 years ago

maria1186 commented 3 years ago

  I want to translate your plugin (https://ui.toast.com/tui-calendar) into Bulgarian. How can I do this? I translate with Poedit.  

jungeun-cho commented 3 years ago

https://nhn.github.io/tui.calendar/latest/WeekOptions https://nhn.github.io/tui.calendar/latest/MonthOptions https://nhn.github.io/tui.calendar/latest/Template

You can use week.daynames, month.daynames and template options.

var calendar = new tui.Calendar(document.getElementById('calendar'), {
    defaultView: 'week',
    taskView: true,    // Can be also ['milestone', 'task']
    scheduleView: true,  // Can be also ['allday', 'time']
    template: {
        milestone: function(schedule) {
            return '<span style="color:red;"><i class="fa fa-flag"></i> ' + schedule.title + '</span>';
        },
        milestoneTitle: function() {
            return 'Milestone'; // Translate the required language.
        },
        task: function(schedule) {
            return '&nbsp;&nbsp;#' + schedule.title;
        },
        taskTitle: function() {
            return '<label><input type="checkbox" />Task</label>'; // translate the required language.
        },
        allday: function(schedule) {
            return schedule.title + ' <i class="fa fa-refresh"></i>';
        },
        alldayTitle: function() {
            return 'All Day'; // Translate the required language.
        },
        time: function(schedule) {
            return schedule.title + ' <i class="fa fa-refresh"></i>' + schedule.start;
        }
    },
    month: {
        daynames: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // Translate the required language.
        startDayOfWeek: 0,
        narrowWeekend: true
    },
    week: {
        daynames: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // Translate the required language.
        startDayOfWeek: 0,
        narrowWeekend: true
    }
});

Please comment if there is a title that needs to be changed further :)

maria1186 commented 3 years ago

Understood. Thank you very much. Everything is perfect :)))