In today’s technology landscape, the effects of Globalization are seen everywhere — the ability to buy products from most countries, interact with business partners from another continent (virtually), and even the real-time social media following of the news, regardless of where it took place. In the landscape of Globalization, the shift in focus has spun back around to hyper-local communities of consumers through a term called “Localization”.
While the words being thrown around are lofty and larger topics to discuss, for the purposes of this blog, Localization will be characterized as serving the same original content to numerous consumers over different geographies in their specified localized language. The same content can feel like a tailored experience when localized properly.
Today I will be demonstrating how to build a basic example of a localized application with content powered by the Cosmic JS CMS API. Adding localization to your Cosmic JS object types allows you to add versions of your content in different languages and locales by using simple Ajax requests to switch content out between the various geographies. The Localization Example App that I will be using is a content-ready web application from Cosmic JS.
I’ll be using Cosmic JS for this example app. Cosmic JS is an API-first CMSthat makes managing and building websites and applications faster and more intuitive. By decoupling content from code, Cosmic JS empowers developer flexibility while ensuring content editors can plan and deploy content as it best suits them. We’ll be using Cosmic JS to install our example app, deploy and make content updates moving forward from the cloud-based Content Management Platform.
If you haven’t already, get started by Signing Up for Cosmic JS. Helpful resources are provided below to streamline your development operations.
Localization Example App PageLocalization Example App DemoLocalization Example App Codebase on GitHubVideo Tutorial: Localization
Your bucket’s name is the name of your website, project, client or web application that you are building. I named mine “Localization” to remain concise for our example blog.
Once you’ve signed up and named your bucket, you’ll be prompted to start from scratch or “see some apps”. For this blog I simply clicked the right button to “see some apps” so that I could begin the installation process for the Cosmic JS Localization Example App.
Cosmic JS gives you the ability to filter between programming languages such as Node.js, PHP, React, AngularJS and more.
Simply click “Install” underneath the Localization Example icon to get started, or visit the Cosmic JS Apps Page.
I clicked “Deploy to Web”. I can then edit Objects while my web application is deploying. You will receive an email confirming the deployment of your web application. If you encounter any issues during deployment, you may be routed to the Cosmic JS Troubleshooting Page.
I’m drawing from a repo, my branch is clarified and I have a deployed location that matches my slug / bucket name that I made in Step 1.
A little reassurance that you’ll soon be up, alive and well on the web. :)
Now you can edit Global Objects, Files, Users, Media and more. Editing is a dream come true in the Cosmic JS Dashboard. To read more about how Cosmic JS was built with editing content in mind, read Building With the Content Editor in Mind.
You’ll receive an email confirming your deployed web application, as well as links and instructions for accessing your live application and managing its content thereafter. It’s as easy as signing up, creating a new bucket, installing the web application(s), edit objects and deploy! I get my confirmation email to access my web application and also see my options for bucket upgrades like custom domains, one-click SSL, webhooks and localization.
Cosmic JS is an API-first cloud-based content management platform that makes it easy to manage applications and content. If you have questions about the Cosmic JS API, please reach out to the founders on Twitter or Slack.
Carson Gibbons is the Co-Founder & CMO of Cosmic JS, an API-first Cloud-based Content Management Platform that decouples content from code, allowing devs to build slick apps and websites in any programming language they want.