web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PCF Culture Info Name ...
Power Apps
Unanswered

PCF Culture Info Name on UserSettings

(1) ShareShare
ReportReport
Posted on by 160

Does the Dev team have plans to expose the formatInfoCultureName property on the UserSettings interface in the componentframework.d.ts type definitions? It appears that the attribute is available on both Model and Canvas which is great.

 

It would be very useful for PCF controls where i'm using external libraries such as moment for dates, or other components that require culture information. eg. moment.locale('fr')

 

For right now i'll just use //@ts-ignore.... which i hate 🙂

 

Thanks,

 

Rick

 

cultureInfoName.png

I have the same question (0)
  • ScottDurow Profile Picture
    1,039 on at

    Generally the d.ts definitions are a subset of the Xrm Client API - and formatInfoCultureName isn't documented at https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-utility/getglobalcontext/usersettings so until that page is updated, I suspect the the d.ts won't be updated either.

     

    I've submitted an issue asking about that field.

     

    In the meantime, the supported approach would be to use the lanuageId property and the languagelocale entity

     

     

    this.context.webAPI.retrieveMultipleRecords("languagelocale",`?$top=1&$select=code&$filter=localeid%20eq%20${languageId}`);

     

     

     

    Hope this helps.

  • Rick Wilson Profile Picture
    160 on at

    Ok just attempted to utilize the UserSettings in Canvas and realized that they don't actually carry over the user settings into a Canvas app.  They are just English by default no matter what i change them to.  I do see that there is a Language() function in Canvas which give the users current browser language but honestly this wouldn't help me because if I'm correct the resx files get loaded even before the init correct?

     

    Are there plans to get this information into the canvas app for general availability?

     

    Thanks,

     

    Rick

  • Rick Wilson Profile Picture
    160 on at

    @ScottDurow 

     

    Unfortunately since the webApi ins't supported in Canvas I don't think this approach would work.  Also it appears that right now the resx files are useless within Canvas.  As you can see in the image below i have my languages to German but my resource strings all come back as English.  Instead of using resx files I'm going to just have to all this in javascript and return the values based upon an input property from the user.  Then in the canvas app i'll just set that parameter to Language(). 

     

    Additionally though i know some users have languages and formatting options that don't match.  Say for instance something who prefers to read in German but needs to have US formatting for currencies and date/times due to their work.  The really nice thing about Dynamics is that the user settings allow for this incongruity by providing the user the option for both.  With canvas apps and the Language() option you are limited to what your internet browser is set to.

     

    Thanks

    Rick

     

    resx.png

  • ScottDurow Profile Picture
    1,039 on at

    Thanks for the update on this. Canvas control support definitely needs some work.

    @HemantG are there any plans to roll out improvements in this area?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 977

#2
Valantis Profile Picture

Valantis 664

#3
11manish Profile Picture

11manish 530

Last 30 days Overall leaderboard