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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Find locale list and decimal seperator (LOCALE_SLIST, LOCALE_SDECIMAL)

(0) ShareShare
ReportReport
Posted on by 1,501

In Ax 2009 we generate CSV files for our users.  We use WinAPI::getLocaleInfo() with LOCALE_SLIST to determine the list seperator we need to use between each column of the CSV file (";" or ",").

Now in Ax 7 how can I find those seperator?  Is it even posssible?  I though about using System.Globalization.CultureInfo but then it will give me the locale of the AOS, which is not what i want.

I think it's not even possible to find that in a browser so I don't think Ax will be able to give me that info.

Let me know if you find a way to correctly give seperated CSV files for each user.

*This post is locked for comments

I have the same question (0)
  • Douglas Noel Profile Picture
    3,905 on at

    Hi,

    normally, without special formatting, the response html rendering engine in ASP net uses the NumberFormatInfo of the thread's current culture. Current Thread.currentCulture Formatinfo

    Think this is set during the request from the user settings of ax user setup.

    Hope this way is used here too. So you can get this standard format info.

    Regards

    Douglas

  • Steeve Gilbert Profile Picture
    1,501 on at

    Just to follow up on this.

    We tried with System.Threading.Thread::CurrentThread.CurrentCulture (which, from documentation, is the same as System.Globalization.CultureInfo) and it wasn't conclusive.  It always gave us "," as list seperator even if we changed it in windows regional setting.  I don't say it doesn't work but we didn't find a way to make it work.

    I think we'll just fallback to ask the user what list seperator he wants and maybe default to what the seperator should be depending on the language.

  • Verified answer
    Martin Dráb Profile Picture
    237,978 Most Valuable Professional on at

    In AX 7, users choose culture in Options > Preferences > Date, time, and number format. What's in the OS (it doesn't even have to be Windows) running the browser isn't important, AFAIK.

  • Steeve Gilbert Profile Picture
    1,501 on at

    Thanks Martin.

    For those who want the answer, here's what I'll use :

    System.Globalization.CultureInfo::GetCultureInfo(xUserInfo::find().PreferredLocale).TextInfo.ListSeparator

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans