[VUE] Localisation of Month/Days

Our pure JavaScript Scheduler component


Post Reply
User avatar
Vincent Auger
Posts: 7
Joined: Mon Nov 18, 2019 9:44 pm

[VUE] Localisation of Month/Days

Post by Vincent Auger »

Hello, currently trying to do a french localisation in a vue project. However, while I can change "ResourceInfoColumn" for example, the DateHelper locale does not seem to have an effect on Month/Day.

In Vue file:

Code: Select all

import { LocaleManager } from 'bryntum-scheduler'

import FrCA from '../scheduler/scheduler-locale-fr'
import EnCA from '../scheduler/scheduler-locale-en'

LocaleManager.locale = 'Fr-CA'

In scheduler-local-fr:

Code: Select all

const locale = {

localeName : 'fr-CA',
localeDesc : 'Francais',

DateHelper : {
    locale: 'fr',
},
....
};

 export default locale;

 LocaleManager.registerLocale('Fr-CA', { desc : 'Francais', locale : locale });
    

Console out of LocalManager.locale shows:

Code: Select all

{localeName: "fr-CA", localeDesc: "Francais", DateHelper: {…}, SchedulerCommon: {…}, ExcelExporter: {…}, …}
DateHelper: {locale: "fr"}
Dependencies: {from: "From", to: "To", valid: "Valid", invalid: "Invalid", Checking: "Checking…"}
...

Any help would be greatly appreciated.


User avatar
Vincent Auger
Posts: 7
Joined: Mon Nov 18, 2019 9:44 pm

Re: [VUE] Localisation of Month/Days

Post by Vincent Auger »

Ok, got it working by copying the entire en local from core/localization. Just having locale didn't seem to work.


User avatar
sergey.maltsev
Core Developer
Core Developer
Posts: 568
Joined: Mon Dec 24, 2018 9:15 am

Re: [VUE] Localisation of Month/Days

Post by sergey.maltsev »

Hi, Vincent Auger!

Locale should have all localization strings within locale.

You could also use LocaleManager.extendLocale for the purposes of extending loaded locales.
https://www.bryntum.com/docs/scheduler/#Core/localization/LocaleManager#function-extendLocale-static

Please check Scheduler\examples\vue\javascript\localization demo for vue localization example.


User avatar
Vincent Auger
Posts: 7
Joined: Mon Nov 18, 2019 9:44 pm

Re: [VUE] Localisation of Month/Days

Post by Vincent Auger »

Hello Sergey,

Thank you for the quick response. As far as I know there is currently no French locale available?

For my purpose I need to be able to go from english to french seamlessly in a Vue SPA. So in this case I've created a new locale JS file based on all three libraries (Core, Grid, and Scheduler) EN locale files and have started translating all keys. So far so good but because of this I will now have check for changes and new keys in each Scheduler version update.

It would be great if there were more locals available but I appreciate that it's a lot of work. Looking through the support forum it seems like a french local is often requested?


User avatar
sergey.maltsev
Core Developer
Core Developer
Posts: 568
Joined: Mon Dec 24, 2018 9:15 am

Re: [VUE] Localisation of Month/Days

Post by sergey.maltsev »

Hi!

Thank you for this suggestion.
I've created this feature request here.
https://github.com/bryntum/support/issues/1120

I can't give any time estimation on this yet but you could contact us at Professional Services to help you with that.
Please see options here: https://www.bryntum.com/services/


Post Reply