How to Add Localization to Bucket Object Types

Community Articles
Community Articles How to Add Localization to Bucket Object Types

Below is a step-by-step tour of how to add the power of Localization to your Cosmic Object Types.


1. Localization happens on the Object Types.  To set up localization in your Bucket go to Your Bucket Dashboard > Object Type > Settings (Cog icon)



2. Then turn localization for this Object Type “On”


3. Select your locales



4. Select your priority local (this will be the display title in the Objects Table)



5. Then on your Object Pages, you will see the Locale option



6. When you want to add the same Object (but in a different language / locale) simply create a new Object, *make sure the slug is the same* and add the different locale


7. Save this Object, then you will see that the Object now appears in the Table with 2 different locales linked


8. Now that you have the 2 versions, you can get the different versions from the API endpoint using the `locale` query param

EN Version:
https://api.cosmicjs.com/v1/install/object/aquamarine?pretty=true&hide_metafields=true&locale=en-US

ES Version:
https://api.cosmicjs.com/v1/install/object/aquamarine?pretty=true&hide_metafields=true&locale=es

This `locale` parameter is available on all endpoints, so if you need to get all Objects with `locale=es`:
https://api.cosmicjs.com/v1/install/object-type/products?pretty=true&hide_metafields=true&locale=es

Or EN:
https://api.cosmicjs.com/v1/install/object-type/products?pretty=true&hide_metafields=true&locale=en-US


I hope you found this article helpful.  Let me know if you have any further questions.  Reach out to me on Slack, and follow Cosmic on Twitter.

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


In basically one Saturday, I was able to move from a confining WordPress instance for my blog to a blazing fast new blog fueled by Cosmic. This flexibility is going to enable me to improve my blog how I want to, serve my content how I want to, design my workflow how I want to.
Thanks to all who attended our first webinar / AMA last week. There was some great engagement and questions that helped steer the screen-share webinar for users in the Cosmic Community as well as first-time visitors to the system. If you missed it, check out the video and attend our next one.
This article will demonstrate how to build a simple ecommerce website with the purpose of showing how we can offer a customized experience for everyone. Our data will be stored and served by Cosmic and we will use Angular for our Front-End.
An Object in Cosmic can be a page, a blog post, an author or anything you want it to be. Cosmic gives you the freedom to create and manage content openly and create your own data structure. Each Object allows for the creation of a title, slug, content and Metafields.
In this tutorial I'll be showing you how I built a Vue.js app with Authentication using Cosmic and AWS Lambda prior to deploying to Netlify. Let's get started.
In this blog we'll quickstart a React ToDo App using the Cosmic CLI. This is a simple todo application that consumes the Cosmic API and is built using React, Redux, Node.js and Webpack.

Ready to Get Started?

Build personal projects for free. Add your team at unbeatable prices.
Start Now Contact Sales