The COVID-19 Triage template is aligned with the scenarios published on the CDC open source repository. To ensure the localized strings are included within the open-source scenario, the localization is done using a switch statement within the scenario itself, rather than using the built-in Healthcare Bot localization manager. This means that customers wishing to introduce a new locale should apply their specific localized strings to the same switch.
Note: Customers should take into account that importing changes from the CDC open-source repository will overwrite these modifications. Customers will need to repeat the listed steps after applying any future update from the CDC-CORE protocol.
The strings in this tutorial are aligned with the COVID-19 Triage template version as of 6th April 2020.
In this tutorial we will walk you through 3 steps to apply a new language to the COVID-19 - CORE PROTOCOL scenario, using the Healthcare Bot built-in localization. In this sample, we will add the British English (en-GB) locale.
In this tutorial, we explain how to localize the strings in the COVID-19 - CORE PROTOCOL scenario. The same method can be used to localize the COVID-19 - CDC WRAPPER scenario.
All the strings in the COVID-19 - CORE PROTOCOL scenario are pre-defined in a dedicated Action step. There is an individual Action step for each set of strings in each of the pre-delivered languages: American English (en-us), Korean (ko-kr), Vietnamese (vi-vn), Chinese Simplified (zh-cn) and Spanish-US (es-us). A switch statement routes to the selected set of hard-coded strings based on the conversation locale, as you can see in the snapshots:
Edit the COVID-19 - CORE PROTOCOL scenario, add the marked Action steps, and link them to the Switch default route:
Now we want to initialize the scenario strings using the built-in Healthcare Bot localization, rather than hard-coded values. For that, we will use the function session.getCustomLocalizedValue
with a new set of string IDs.
Edit each of the Action steps and copy into it the content from the corresponding JSON file from Actions folder.
The last step is to create strings with the IDs of step #2. This can be done either manually, or by importing excel with the full set of IDs.
In the Healthcare Bot management portal navigate to the Localization management page (Language > Localization) and import the core_protocol_strings excel file localized for British English (en-gb). To enable other languages, edit the excel file, and add a column for each required language and re-import it. Learn more about the built-in localization manager.
You can now go back to the scenario and run it using the en-gb
locale.
If you have completed the configuration and customization correctly you should see the following localized question: