Spike: Integration of Configurator for Latin American Websites
Closed this issue · 0 comments
Description:
The objective of this spike is to determine the best method for deploying our truck builder configurator that will have Anthem and Granite models on the 19 Latin American export websites. There will be English and Spanish language variants, see below list that will determine which markets will display either in English or Spanish.
Acceptance Criteria for Discovery:
- Identify and pass the information to the configurator about the version of the configurator that should be loaded. Default or LA (Latin American) version
- Identify and pass the information of the language/locale
- Agree with Rapid images how this information will be provided
Notes
June 26th Update from Rapid Images: Regarding the Latin America rollout, here is a rundown of the discussions me and Syb have had on this topic:
- We need a way to know that we're on the shared Latin American market, so that the configurator knows what locale data to load. The domain names vary wildly between these different markets though, so there is no straightforward way to use the URL for this.
- Syb suggested that we use the language attribute on the HTML document instead. Someone on the NetCentric side would have to make sure that this attribute is accurate across the markets.
- We also need to decide how to determine which values should correspond to the Latin America market. A simple way would be to hardcode the list into the configurator. Optionally, if you want to be able to control this from the NetCentric side, we could use some other meta attribute in the document to store this list. If we are to hardcode it, we need a list of the relevant language codes.
- The configurator needs to dynamically adjust based on the website's locale to ensure correct data loading and functionality.
Related Tickets
Outcome/Notes and required tasks
by @alexiscoelho
1 - Required tasks that will satisfy the need of knowing the language of the current page:
- The rest of the frontend changes related with helix 5 need to be finished and the following PR needs to be delivered: #723
- With the previous point done we will be able to accommodate the logic around setting the html element language present on the file
scripts/scripts.js
:const language = getMetadata('locale') || 'en'; document.documentElement.lang = language;
. For this the metadata field namedlocale
needs to be properly set for each market. Otherwise will fallback toen
With the above done and all of the content metadata set on all markets the lang attribute on the html element will be set to the correct language.
2 - To allow the configurator to load the correct version for the current locale:
-
In SharePoint refactor thetruckConfiguratorUrls
(->truckConfiguratorConfigs
) configuration to hold more information. And after configure as a property the version that the configurator should load. Default or LA (Latin American). - Agree with Rapid Images on the better way to pass this configuration to them.
Summary:
1 - The language of the page will be provided on the html element lang attribute.
2 - The list of locales will be configured/hardcoded on the configurator.
Necessary tasks:
- The locale metadata content needs to be set across all of the Mack markets. As it is on www.macktrucks.com as
en-US