System language date

Hi, how can I get the dates in Italian?
I currently have this format in my app:
06 October 2022 but I would like: 06 Ottobre 2022. How is it possible to do this?
Thank you

Use formula where you want to show it:

FORMAT_DATETIME_LOCAL(dateVariable, "DD MMMM YYYY")

Not that this will just rearrange the order, so if you call a month differently than in English, it would still show the English month name. But at least the order would be correct.

Hi @Mihaly_Toth, I know this formula and I use it to define the “day-month-year” format.
What I want to do here instead is to have the month in a language other than English (in my case Italian) or as it should be in the language of my operating system.

There is no easy way of currently doing it… You’ll have to create a variable and use formulas to bind those things. In this case you could simply create a list of texts with Italian month names and assign the value to a formula like this:

appVars.monthLocalisation[NUMBER(GET_DATETIME_COMPONENT(yourDate, "month"))-1]

What this should do is to get the current value of the month, which would be 1, 2, … 12 and gets the corresponding item from the list. You should subtract 1, as we are using the index of the list of texts and the list of texts starts with the index 0.

Hope this clarifies.

Hi, yes this definitely looks like something closer to what I intend to achieve, thanks!

Okay, I can tell you a little more insight on this. As I have already done such a thing with one of my projects.
It is a reservation form and I have a calendar view.

I have an app variable monthLocalisation which is a list of objects with 2 properties as below:

The name is the localized month name, in my case e.g. “Október” instead of “October” and the short is the MMM abbreviation of the month in English, so in case of October it is: “oct”.
I have set the initial values of this list in the right side of the Composer by clicking on “add initial value”:

After this, I just need to find the correct value and replace it with the localised one in the property as follows:
Képernyőfotó 2022-10-06 - 17.19.15

FORMAT_DATETIME_LOCAL(appVars.midDay, "YYYY")+". "+FIND_BY_KEY(appVars.monthLocalisation, "short", LOWERCASE(FORMAT_DATETIME_LOCAL(appVars.midDay, "MMM"))).name

Here the “appVars.midDay” is the current day and then I use this to change the calendar view from this month to next or last month with arrows and some ADD_DURATION() or SUBTRACT_DURATION() formulas. The above formula is looking for the current month’s short MMM type in the list of monthLocalisation and then shows the “name” property.

*You could in fact use LOOKUP() instead of my . dot-notation here, but this seemed to be the more intuitive way…

Of course you could further improve it by creating a variable with a schema like this:

[
  {
    language: "it", 
    months: [
      {name: "October", short: oct}, 
      {}, 
      ....
      {}
    ]
  }, 
{language: "hu", months: [{name: "Október", short: oct}, {}, ....{}]}
]

Hope this will guide you well.

Hi, I created something very similar to yours in another app of mine to get the translation of the whole user interface (where the user can choose which language he wants between Italian \ English \ French).
I was hoping to be able to avoid all the long steps required at least for the month names that should be natively available in the operating system depending on where the user is located, but apparently not. :sweat_smile: