We’re proud to announce that multilingual support is now out of beta and merged into version one of the moltin API. Multilingual takes you a step further to being able to localize your application’s data further than ever.
To get started with using multilingual, log into the dashboard and navigate to the Languages tab.
You can create a new language like so:
Once you’ve created your first language, navigate to the product page. Once there, toggle the language selector in the top left and choose the language you would like to use. Now you’ve selected your language, edit your products title field:
Now hit save and switch between languages, you will see two separate data sets on the same product.
Loading languages from the API
To pull in specific languages from the API when you make a call, you need to set a specific header:
For example, if we’d like to pull in the data for the newly created Italian language we would pass the following on an API request:
This would bring back the French dataset applicable to that call. If no matching dataset is found, it will default to your base language.