How to Localize Content with Cosmic JS


Numerous teams in the Cosmic Community are using the Cosmic JS Localization feature to tailor their content for various regions and locales. A common use case scenario includes companies whose businesses operate in multiple countries, necessitating they serve up Press, Blog or Job feeds in disparate languages. Another common example is a company whose demonstration or case study is geo-specific to the region they're servicing: i.e. the case study for your bed and breakfast in London doesn't help me if I'm in Rome. 😀  If you have content that you need to localize yet want to manage in the same Bucket, Cosmic JS is the solution for your project. 


How to Localize Content with Cosmic JS

The Localization add-on allows you to reach a global audience by giving you the power to build your content in different languages. You have an option tab in your Object Type settings titled "Localization". Choose from over 400 different locales to serve your content to the world.




Localization allows you to provide multiple versions of the same content in different languages. This will be available in your endpoints by adding a locale query value to each request. For example, if you have an About Us page for your website that you would like to provide in English, Spanish and German. 

After you create the content for each language, you can get each version with /my-bucket/object/about-us?locale=en, /my-bucket/object/about-us?locale=es and /my-bucket/object/about-us?locale=de.


Cosmic JS Localization Resources

Check out this video to see how to power-up your app with Cosmic JS localization.


Cosmic JS Localization Examples  

Cosmic JS provides a Localization Example App available on the Cosmic JS Apps page. There's also a Multi-Language Survey App available for easy install. 



I hope that you've found this tutorial helpful. If you have questions or comments about Content Editor Features in the Cosmic JS system, I'd love to hear about them. 

carson@cosmicjs.com 

Was this article helpful?

Thank you! Your input helps us improve our articles and resources. If you have any other questions or comments, please contact support.

You may also like


An application for book lovers to view a list of their favorite books.
To demonstrate how easy it is to get started with Cosmic JS, we'll utilize the Cosmic JS CLI to quickstart a Vue.js Music App. This Music website was built using Vue, Nuxt and Cosmic JS. Users can upload and play tracks, upload and manage album art plus leave comments.
In this video, Cosmic JS co-founder Tony Spiro takes you on a tour of the new Cosmic CLI which allows you to do all of the awesome things you can with the Cosmic JS API, from the comfort of your command line interface.
Step by step guide to build a professional developer's portfolio using React, Cosmic JS, and Semantic-UI
Cosmic JS allows you to easily create nested structures and upload media files. We learn how nested structures are built and how you can fetch such data from Cosmic JS API to use in a simple music site app.
Using Cosmic JS's Webhooks we can sync Algolia with Cosmic JS to provide search to our projects.