Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JosueMolina
Helper I
Helper I

Fabric Notebook Locale Setting

I was able to run this code:

 

locale.setlocale(locale.LC_TIME,"es_ES") before. But now the locale string is unsupported. Is there any way I can change the locale for a Notebook session. This helps with multiple formats we use across Notebooks.
7 REPLIES 7
HimanshuS-msft
Community Support
Community Support

Hello @JosueMolina ,
Thanks for the ask and using the Microsoft Q&A platform.\nAt this time, we are reaching out to the internal team to get some help on this .
We will update you once we hear back from them.
Thanks Himanshu

@HimanshuS-msft do you have an update on this ? I would like to test it out with some Notebooks we depend on, now that we are nearing the end of the year.

Hello @JosueMolina
Sorry for the late reply .
If the requirement is to set locale to handle local timezone then yes. You can set timezone at session level by changing the Spark Config "
spark.sql.session.timeZone" or using SparkSQL SET command -
SET TIME ZONE - Spark 3.4.0 Documentation (apache.org)
Thanks 
Himanshu 


Hi @HimanshuS-msft 

Sadly, this doesn't work as the purpose of changing the locale is to use pandas or pandas on Spark to create a Calendar with the proper Weekday names and Month names in Spanish without resorting to a replace as we add more variations of these names.

df['date'].dt.strftime("%a")
will not output the desired weekday abbreviated name



Hi @JosueMolina 

 

Apologies for the delay in response.

Could you please go ahead and raise a support ticket to reach our support team:

https://support.fabric.microsoft.com/support

After creating a Support ticket please provide the ticket number as it would help us to track for more information.

 

Thanks

 

 

I managed to do this entirely using a locale format with Spark, foregoing Pandas usage. While the workaround was functional, the issue of not being able to set my own locale outside of Spark configs is not ideal.

This is not a solution as the main issue of setting a custom locale within the notebook has not been addressed.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

March 2024  FBC Gallery Image

Fabric Monthly Update - March 2024

Check out the March 2024 Fabric update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors