I am working with a Dynamics 365 Customer Self-service Portal add-on (v9.x) for a CRM Online instance and I've run into a problem trying to deliver dynamic localized content. The default language for the portal is US english which is fine for this implementation, however I also wanted to support UK english and that doesn't seem to be possible. I'm looking for an alternate way deliver dynamic content within specific portal pages. I want to have pages display content such as different support contact information (phone number and email address), or different currency and date formatting based on the customer's country or region selection or browser language. I'm thinking of storing that in a cookie, and then somehow use that to display the correct content. This has been a real struggle since the portal code is not accessible and I'm not seeing how to apply something like that. Has anyone come up with a solution to do something like this?
1 Answers
That's a bit of broad question, so a bit of broad answer.
Portal's have multi-language support which you may be able to use to achieve some of this functionaility - though it only appears to have single version of English.
Enable multiple-language portal support
A single portal can display content in multiple languages to reach customers around the world. The content of your portal can be translated into multiple languages while maintaining a single content hierarchy.
You can use Liquid to create conditional content, e.g. showing different phone numbers based on user's address.
Available Liquid conditional operators
{% assign empty_string = %}
{% if empty_string %}
<p>This will render.</p>
{% endif %}
You could use Liquid to display data in a bespoke manner with user specific versions.
Dynamics 365 for Customer Engagement entity tags.
Dynamics 365 for Customer Engagement entity tags are used to load and display Dynamics 365 for Customer Engagement data, or use other Dynamics 365 for Customer Engagement portals framework services. These tags are Dynamics 365 for Customer Engagement-specific extensions to the Liquid language.
You could use client side JavaScript to transform page content in a variety of ways. For example using Moment.js to transform dates.
Dates can already be localised.
Behavior and format of the date and time field
- User Local: The field values are displayed in the user’s local time and formatted as per their current portal language/locale.
- Date Only: The field values only contain the date and are displayed with no time zone conversion.
- Time-Zone Independent: The field values contain date and time, and are displayed with no time zone conversion.