Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined in calendar #7

Open
Dihgg opened this issue Aug 3, 2017 · 4 comments
Open

Undefined in calendar #7

Dihgg opened this issue Aug 3, 2017 · 4 comments

Comments

@Dihgg
Copy link

Dihgg commented Aug 3, 2017

As image below, the calendar have undefined everywhere (this is the index.html of the repo)
undefined

@mssc89
Copy link

mssc89 commented Aug 13, 2017

Exactly the same problem here

@Dihgg
Copy link
Author

Dihgg commented Aug 14, 2017

@mssc89 i used the moment.js without the locales. change to moments with locales may resolve

@bpetersen1
Copy link

Hi, same issue here, any way to remedy this ? i tried using moment with locals, but no luck.

Your feedback is greatly appreciated.

@UgoSansH
Copy link
Owner

We can declare your personal translator

see example with FR =

    epepite.DatePicker.Translations.fr = {
        'close':       'Fermer',
        'booking':     'Réservation',
        'reserve':     'Réservé',
        'travel':      'Trajet',
        'travel_time': 'Temps de trajet',
        'day':         'Jour',
        'month':       'Mois',
        'header':      {
            'year_next': 'Année suivante',
            'year_prev': 'Année précédente %year%'
        },
        'days' : [
            'Dimanche',
            'Lundi',
            'Mardi',
            'Mercredi',
            'Jeudi',
            'Vendredi',
            'Samedi'
        ],
        'months': [
            'Janvier',
            'Février',
            'Mars',
            'Avril',
            'Mai',
            'Juin',
            'Juillet',
            'Août',
            'Septembre',
            'Octobre',
            'Novembre',
            'Décembre'
        ]
    };

epepite.Datepicker.Calendar use epepite.DatePicker.Translator by default

epepite.DatePicker.Calendar = function(config, translator, templating, unavailabilities)

Api interface of epepite.DatePicker.Translator:

epepite.DatePicker.Translator:setCurrentLocale(string locale): void
epepite.DatePicker.Translator:getCurrentLocale(): string
epepite.DatePicker.Translator:setTranslation(string locale, object translations): self
epepite.DatePicker.Translator:trans(string message, object? params, string? locale): string
epepite.DatePicker.Translator:has(string locale): bool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants