Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[data-export] Add Opt-in Localization for Date-Time Formatting #674

Open
dmoruzzi opened this issue Dec 9, 2024 · 2 comments
Open

[data-export] Add Opt-in Localization for Date-Time Formatting #674

dmoruzzi opened this issue Dec 9, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@dmoruzzi
Copy link

dmoruzzi commented Dec 9, 2024

Is your feature request related to a problem? Please describe.

The Data Export functionality currently works as expected. However, this request focuses on a feature enhancement to support localized date-time formats. Currently, my colleagues need to manually convert date-time values to the stakeholder's preferred format (such as en-US, en-GB, etc.) when creating ad-hoc data reports. Enabling users to configure localization settings before export would save time for administrators, power users, and developers.

Describe the solution you'd like

Introduce an opt-in localization feature within the Data Export settings (Options -> Data Export). Users should be able to choose a preferred locale, or select from two special options:

  • '' (empty / default): No format conversion, display date-time as provided by Salesforce.
  • local: Use the browser's navigator.language setting.

To promote maintainability and consistency, this feature should rely on the "Intl.DateTimeFormat" API, and users should be encouraged to refer to standards organizations for proposed date-time format changes rather than project-tailored solutions. The user's localization preferences should persist across sessions via local storage configurations.

Additional context

This feature would reduce manual effort and improve the usability of exported reports. Business users often rely on Data Export reports for decision-making, and having dates displayed in the correct local format would enhance clarity and efficiency.

This functionality should integrate with Feature 527 to support localized time-zone conversions, but should remain independent to allow users to retain UTC/GMT times if preferred.

Here are mockups of the export configuration screen showing the localization options:

  • Default (no localization):

    Localization not configured results

  • Local (using browser's locale, e.g., en-US):

    Localization "local" results where end-user in en-US

  • Specified locale: "en-IN":

    Localization en-IN results

  • Specified locale: "de-DE":

    Localization de-DE results

@tprouvot
Copy link
Owner

tprouvot commented Dec 9, 2024

Hi @dmoruzzi,

I recently implemented the local switcher from the popup, I think that using the standard FORMAT SOQL function + this local switcher would allow users to quickly change the date format.

What do you think about it ?

@dmoruzzi
Copy link
Author

dmoruzzi commented Dec 9, 2024

I decided not to pursue the language pop-up feature, as it didn't align with my company's specific needs. When our support engineers triage incidents for our Middle Eastern or Asian operations, we want to preserve users' existing Salesforce language preferences (primarily English) while adjusting the time format to align with local expectations for reports or screen sharing. Non-localized time formats often cause unnecessary confusion and delays, especially during incident calls with international regional managers who may not be accustomed to Salesforce's default ISO datetime formatting. This enhancement is intended to address that issue.

I understand that this use case is more applicable to multinational enterprises than to most system administrators, so I’m not overly concerned about its inclusion.

One area of concern with your suggestion is the implicit modification of datetime formats for exports. Changing from the ISO standard can make the data incompatible with Salesforce’s import tools and workflows. For example, a system administrator may choose to update their language preference to Spanish (their primary language), but this may inadvertently alter the datetime format in a way that introduces breaking changes. To avoid such issues, I believe an explicit opt-in for format changes is essential. This could be done by a checkbox on the Data Export options page, but that point I feel having them specify the locale (or "local") is just granting them more customization.

Do you want me to investigate any further for this functionality?

Edit: I think Format could be beneficial instead. However, this requires people to specify which fields will have dates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants