Our powerful JS Calendar component


Post by erzi »

When we switch language between English to Swedish some of the text is not translated to Swedish.
The weekdays in the calendar for example are still in English (Monday, Tuesday etc)
Also, the month name in the calendar is in English.
Other texts in the calendar are translated to Swedish.

Can you please help us resolve this issue.

Attachments
A couple of screenshots showing that Swedish and English is mixed in the calendar
A couple of screenshots showing that Swedish and English is mixed in the calendar
Swenglish.png (100.78 KiB) Viewed 598 times

Post by tasnim »

Hi,

I tested it in our demo and it is working fine here https://bryntum.com/products/calendar/examples/localization/

Screenshot 2023-11-24 190347.png
Screenshot 2023-11-24 190347.png (114.92 KiB) Viewed 591 times

Could you please provide us a runnable test case so we can check what's wrong?


Post by Animal »

How are you switching the locale?

If you go to the online examples, you can do this in the debugger:

calendar.localeManager.applyLocale('SvSE')

That is how to switch locales.


Post by anni »

Hi, I am jumping in here, we are using REACT and the way to switch locales is done like this:

import SvSELocale from '@bryntum/calendar/locales/calendar.locale.SvSE';
LocaleManager.applyLocale('SvSE', { locale: SvSELocale });

This does change the locale of 99% of the calendar, but as the image in opening post shows, some things are not translated.

To make sure I did nothing wrong I opened the basic REACT example and only added the locale change and it still shows the same issues. I am guessing there is something wrong in the react components themselves. Any help would be greatly appreciated.


Post by ghulam.ghous »

Hi Anni,

I have checked this using our React basic calendar example online https://bryntum.com/products/calendar/examples/frameworks/react/javascript/basic/build/ by adding the following code:

import SvSELocale from "@bryntum/calendar/locales/calendar.locale.SvSE";
import { LocaleManager } from '@bryntum/calendar';

// Add this inside App component
    React.useEffect(()=>{
    LocaleManager.applyLocale("SvSE", { locale: SvSELocale });
    },[])

And you can see in the screen shots below that it updates all the content to new Local apart from the data.

Screenshot 2023-12-07 at 1.13.12 PM.png
Screenshot 2023-12-07 at 1.13.12 PM.png (231.97 KiB) Viewed 557 times

So can you try this on your end and let us know the results.

Regards,
Ghous


Post by anni »

Hi, it was imported wrong, thanks for you help its now working as expected


Post by ghulam.ghous »

Glad to hear! Always happy to help.


Post Reply