Configure recurring texts in the messages.json
Purple Experience Builder
With maintaining your messages.json, you can reuse terms in different views and access them as variables in your Purple Experience.
In this article, you learn how to edit text belonging to text keys in the messages.json in Purple Experience Builder. You will go to the messages.json, change the text for the text keys belonging to the search view in your app, review the text in the preview, update the dynamic resources and merge your changes.
1. Go to Experience Builder, choose your app from the list and click on it
2. Click on 'Pull from preview'
3. Click on 'default'
4. Click on 'storefront'
5. Click on 'assets'
6. Click on messages.json
7. Scroll down in the list of text keys to the keys beginning with 'SEARCH'
8. Go to the text next to 'SEARCH_FIELD_PLACEHOLDER' and overwrite the text with your own desired text, e.g. 'Search'
9. Go to the text next to 'SEARCH_RESULTS_EMPTY_TITLE' and overwrite the text with your own desired text, e.g. 'Search results'
10. You can repeat Step 8 or 9 for each text key that you wish to change.
11. When you are done with the change, click on the preview symbol.
12. Click on 'Search'
13. Check the Search view to make sure the changed text keys look as expected
14. Click on the burger menu
15. Click on 'Update Dynamic Resources'
16. Name your changes, e.g. 'configured-messages-json'
17. Click on 'Merge all files to preview'
You have now changed the text in the Purple Experience of your app by editing the text for some keys in the messages.json. You can review the results in your App Preview and push them live if you are happy with it, to make them visible to your users.