Improving regional currency format support in Directus: Language vs. Locale settings

Hello !

For my simple currency field extension (featured on the latest changelog :blush:) I received an issue about currency formatting issues for Argentina.

The issue:

When using the “Spanish Latin America” (es-419) language setting, Argentine peso is displayed with:

• Currency code “ARS” instead of the correct “$” symbol

• Incorrect decimal/thousands separators (Argentina uses comma (,) as decimal separator and period (.) for thousands)

Current understanding:

It appears Directus supports languages (like Spanish Latin America) but not country-specific locales like ⁠es-AR (Spanish Argentina). This creates formatting issues for currencies in countries that share a language but have different formatting conventions.

Questions:

  1. Is there a way to add support for country-specific locales (like ⁠es-AR) in Directus?

  2. Would it make sense to separate language selection from locale/formatting settings in Directus core?

  3. Is this something that should be addressed at the extension level, or would it be better implemented in Directus core?

I believe proper locale support should be handled at the instance level rather than requiring each extension to implement its own locale handling. This would ensure consistent formatting across the entire application.

Any insights or guidance would be greatly appreciated!

Hi there!

Thanks for flagging this.

It appears that es-AR is currently unsupported at a platform level:

May I recommend please opening an issue on GitHub to request this locale?

Thank you in advance!

Thanks @carmenh! I’ll definitely do that. It would answer my first question.

I am still wondering about my other two questions. Languages and locales are not the same (imo). This “Language” setting seems to do a bit of both (which quickly gets confusing when you try to zoom in on it). A fun rabbit hole.

I personally think that language (most specifically translations) should be separate from the locale. Directus might support a few languages (as it does now!!) but would it not make sense to just support any locale for the Studio? Just some random thinking here, curious on how others think of this thats why I added it to the community forum first.

Thanks again!

That’s a super fair point, thanks for pointing it out!

Would be good to add to the issue, please!