PageSourceSearch

https://app.takeshape.io/docs/assets/js/32bd65ee.b6079778.js

js takeshape.io collected 2026-09-25 14:10:26 UTC 6,103 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_takeshape_docs=self.webpackChunk_takeshape_docs||[]).push([[2947],{701:(e,a,n)=>{n.r(a),n.d(a,{default:()=>l});const l=n.p+"assets/images/multiple-locales-6ddade92dcb9b611fccfa742ba728be2.gif"},12082:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>r,contentTitle:()=>c,default:()=>p,frontMatter:()=>s,metadata:()=>l,toc:()=>d});const l=JSON.parse('{"id":"data/localization","title":"Localization","description":"Content can be localized into different languages and","source":"@site/docs/data/localization.mdx","sourceDirName":"data","slug":"/data/localization","permalink":"/docs/data/localization","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"Editor","permalink":"/docs/data/editor"},"next":{"title":"Versions","permalink":"/docs/data/versions"}}');var t=n(65723),i=n(16585),o=n(88725);const s={},c="Localization",r={},d=[{value:"Configure Locales",id:"configure-locales",level:2},{value:"Set Default Locale",id:"set-default-locale",level:2},{value:"Configure Localized Shapes Fields",id:"configure-localized-shapes-fields",level:2},{value:"Query Locales With The GraphQL API",id:"query-locales-with-the-graphql-api",level:2}];function h(e){const a={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.header,{children:(0,t.jsx)(a.h1,{id:"localization",children:"Localization"})}),"\n",(0,t.jsxs)(a.p,{children:["Content can be localized into different languages and\ncountries. Locales represent a combination of a language and optionally\na country. Languages are represented by ",(0,t.jsx)(a.a,{href:"https://en.wikipedia.org/wiki/ISO_639-1",children:"ISO\n639-1"})," two-letter codes.\nCountries are represented by ",(0,t.jsx)(a.a,{href:"https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2",children:"ISO 3166-1\nalpha-2"})," \xa0two letter\ncodes. The default locale that all projects start in is English - ",(0,t.jsx)(a.code,{children:"en"})]}),"\n",(0,t.jsx)(a.h2,{id:"configure-locales",children:"Configure Locales"}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.strong,{children:"A Single Locale"})}),"\n",(0,t.jsx)(a.p,{children:"Developer, Hobby, and Starter plans come with the ability to change the\ndefault locale."}),"\n",(0,t.jsx)(o.A,{img:n(48278)}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.strong,{children:"Multiple Locales"})}),"\n",(0,t.jsx)(a.p,{children:'"Professional" plans and above have the ability to configure multiple\nlocales. New locales can be added and removed.'}),"\n",(0,t.jsx)(o.A,{img:n(701)}),"\n",(0,t.jsx)(a.h2,{id:"set-default-locale",children:"Set Default Locale"}),"\n",(0,t.jsx)(a.admonition,{type:"caution",children:(0,t.jsx)(a.p,{children:"Changing your project's default locale can cause you to lose data."})}),"\n",(0,t.jsx)(a.p,{children:"There are 2 scenarios when changing a project's locale is appropriate."}),"\n",(0,t.jsxs)(a.ol,{children:["\n",(0,t.jsx)(a.li,{children:"At the start of a project to establish the default locale for which\nfuture content will be entered into the project."}),"\n",(0,t.jsx)(a.li,{children:"To correct a situation where content in a single locale was created\nand the default locale is being changed to appropriately match the\ncontent."}),"\n"]}),"\n",(0,t.jsx)(a.p,{children:"Changing your default locale will relabel the default locale from the\ncurrent locale code to the new locale code."}),"\n",(0,t.jsx)(a.p,{children:"Content in the current locale will appear in the new locale.\nHowever, non-default locale translations WILL be preserved.\nWhen a non-default locale translation is preserved the original locale\ncontent will be lost. All content in the current default locale will be\ncleared."}),"\n",(0,t.jsxs)(a.p,{children:["This action is ",(0,t.jsx)(a.strong,{children:"IRREVERSIBLE"})," and should only be taken with a full\nunderstanding of how this change will impact the content of this\nproject."]}),"\n",(0,t.jsx)(a.h2,{id:"configure-localized-shapes-fields",children:"Configure Localized Shapes Fields"}),"\n",(0,t.jsx)(a.p,{children:'Individual fields can be configured to be localized or not via a\ncheckbox. Repeater fields have a special "Share items between locales"\ncheckbox, that we recommend keeping checked on. Sharing the repeater\nbetween locales keeps the number and order for repeater items the same\nacross locales.'}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.strong,{children:"Configuring Localization in the shape"})}),"\n",(0,t.jsx)(o.A,{img:n(95588)}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.strong,{children:"Creating content in each locale"})}),"\n",(0,t.jsx)(a.p,{children:"There is a locale chooser dropdown in the sidebar of content entries.\nContent must be saved in the default locale in order for additional\nlocale options to appear."}),"\n",(0,t.jsx)(o.A,{img:n(48559)}),"\n",(0,t.jsx)(a.h2,{id:"query-locales-with-the-graphql-api",children:"Query Locales W
1ith The GraphQL API"}),"\n",(0,t.jsx)(a.p,{children:"GraphQL queries can be written like this:"}),"\n",(0,t.jsx)(a.pre,{children:(0,t.jsx)(a.code,{className:"language-graphql",children:'{\n  getLocaleExampleList(locale: "es-es") {\n    items {\n      ...\n    }\n  }\n}\n'})}),"\n",(0,t.jsx)(a.p,{children:"Or like this:"}),"\n",(0,t.jsx)(a.pre,{children:(0,t.jsx)(a.code,{className:"language-graphql",children:'withContext(locale: "fr", languageFallback: false) {\n  getLocaleExampleList {\n    items {\n      ...\n    }\n  }\n}\n'})})]})}function p(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,t.jsx)(a,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},48278:(e,a,n)=>{n.r(a),n.d(a,{default:()=>l});const l=n.p+"assets/images/single-locale-b781eacdb820400a7dadccc3f3799de3.gif"},48559:(e,a,n)=>{n.r(a),n.d(a,{default:()=>l});const l=n.p+"assets/images/data-localization-5140b145b60c5f503283e1df89cbae7e.gif"},95588:(e,a,n)=>{n.r(a),n.d(a,{default:()=>l});const l=n.p+"assets/images/shape-localization-0082fe9d371b8badf043d25bd3bd216e.gif"}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.