The kind of host. web means a plain browser with no bridge.
string
The concrete operating system.
In a browser the answer is immediate, with the OS read from the user agent. In a shell it takes one round trip; if an older shell does not answer within 1.5 s, the SDK falls back to a user-agent guess. The result never changes during a session and is cached.Inside UIProvider, useUI() has the same information synchronously.
Language
The shell’s UI language as a short code ('en', 'tr', …). Unlike the platform, it can change while your app is open, when the user switches language in the shell.
import { useEffect } from 'react';import { useLanguage } from '@cskn/sdk';import i18n from './i18n';function LanguageSync() { const language = useLanguage(); // null until resolved; updates live useEffect(() => { if (language) void i18n.changeLanguage(language); }, [language]); return null;}
In a browser it is the browser’s language. Without React:
Function
Returns
getLanguage()
Promise<string>
getCachedLanguage()
The last known language, or null
onLanguageChange(cb)
Called on every switch; returns an unsubscribe function
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"cskn Developers","colors":{"primary":"#0E7490","light":"#22D3EE","dark":"#0E7490"},"logo":{"light":"https://mintcdn.com/cskn/nVnP1SM0RHDt2P4O/logo/light.svg?fit=max\u0026auto=format\u0026n=nVnP1SM0RHDt2P4O\u0026q=85\u0026s=c32921af2ea7b26ed147c2fc20b7ccee","dark":"https://mintcdn.com/cskn/nVnP1SM0RHDt2P4O/logo/dark.svg?fit=max\u0026auto=format\u0026n=nVnP1SM0RHDt2P4O\u0026q=85\u0026s=744e66e27e1cf87a23616f001cc434fe"},"favicon":"https://mintcdn.com/cskn/nVnP1SM0RHDt2P4O/favicon.svg?fit=max\u0026auto=format\u0026n=nVnP1SM0RHDt2P4O\u0026q=85\u0026s=3befee8751ab38dad2aa73683be379c7","navbar":{"primary":{"type":"button","label":"cskn.app","href":"https://cskn.app"}},"footer":{"socials":{"website":"https://cskn.app"}},"contextual":{"options":["copy","view"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cskn","hasAudioNarration":false,"actualSubdomain":"cskn","customDomains":["docs.cskn.dev"],"gitSource":{"type":"github","owner":"cskndev","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b1101889ffae5051c41e0df"},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6b11d0585cba04131759e65f","clientVersion":"0.0.4458","searchFilterCounts":[{"language":"default","tag":"@cskn/sdk","count":36},{"language":"default","tag":"@cskn/ui","count":27},{"language":"default","tag":"Native features","count":20},{"language":"default","tag":"Platform API","count":10},{"language":"default","tag":"Get started","count":9},{"language":"default","tag":"Components","count":9},{"language":"default","tag":"Profile integration","count":7},{"language":"default","tag":"Overview","count":6},{"language":"default","tag":"Platform","count":5},{"language":"default","tag":"Stack navigation","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"sdk/native/platform-language","slug":"/sdk/native/platform-language","pageMetadata":{"title":"Platform and language","description":"Which OS and host your app runs on, and the shell's UI language.","href":"/sdk/native/platform-language"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Which OS and host your app runs on, and the shell’s UI language.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`platform`,children:`Platform`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`usePlatform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`getPlatform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@cskn/sdk'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` platform`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` usePlatform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// null until resolved`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`platform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 'mobile' | 'desktop' | 'tv' | 'web'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`platform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`OS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 'ios' | 'android' | 'mac' | 'windows' | 'linux' | 'webos' | 'tizen'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`OS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getPlatform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),`\n`,_jsx(ResponseField,{name:`env`,type:`'mobile' | 'desktop' | 'tv' | 'web'`,id:`param-env`,children:_jsxs(_components.p,{children:[`The kind of host. `,_jsx(_components.code,{children:`web`}),` means a plain browser with no bridge.`]})}),`\n`,_jsx(ResponseField,{name:`OS`,type:`string`,id:`param-os`,children:_jsx(_components.p,{children:`The concrete operating system.`})}),`\n`,_jsx(_components.p,{children:`In a browser the answer is immediate, with the OS read from the user agent. In a shell it takes one round trip; if an older shell does not answer within 1.5 s, the SDK falls back to a user-agent guess. The result never changes during a session and is cached.`}),`\n`,_jsxs(_components.p,{children:[`Inside `,_jsx(_components.code,{children:`UIProvider`}),`, `,_jsx(_components.a,{href:`/ui/provider#useui`,children:_jsx(_components.code,{children:`useUI()`})}),` has the same information synchronously.`]}),`\n`,_jsx(Heading,{level:`2`,id:`language`,children:`Language`}),`\n`,_jsxs(_components.p,{children:[`The shell’s UI language as a short code (`,_jsx(_components.code,{children:`'en'`}),`, `,_jsx(_components.code,{children:`'tr'`}),`, …). Unlike the platform, it can change while your app is open, when the user switches language in the shell.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`useEffect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'react'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`useLanguage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@cskn/sdk'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` i18n`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` './i18n'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` LanguageSync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` language`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` useLanguage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// null until resolved; updates live`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` useEffect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`language`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` i18n`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`changeLanguage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`language`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }, [`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`language`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`In a browser it is the browser’s language. Without React:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Function`}),_jsx(_components.th,{children:`Returns`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`getLanguage()`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Promise\u003cstring>`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`getCachedLanguage()`})}),_jsxs(_components.td,{children:[`The last known language, or `,_jsx(_components.code,{children:`null`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`onLanguageChange(cb)`})}),_jsx(_components.td,{children:`Called on every switch; returns an unsubscribe function`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Platform and language","description":"Which OS and host your app runs on, and the shell's UI language.","href":"/sdk/native/platform-language"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Platform","slug":"platform","depth":2,"children":[]},{"title":"Language","slug":"language","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"cskn","siteName":"cskn Developers","title":"Platform and language - cskn Developers","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-08T00:17:52.309Z","originalFileLocation":"sdk/native/platform-language.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Which OS and host your app runs on, and the shell\u0026#x27;s UI language.\">\u003cmeta data-mint-head name=\"application-name\" content=\"cskn Developers\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Platform and language - cskn Developers\">\u003cmeta data-mint-head property=\"og:description\" content=\"Which OS and host your app runs on, and the shell\u0026#x27;s UI language.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"cskn Developers\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cskn.dev/sdk/native/platform-language\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cskn.mintlify.site/_mintlify/api/og/v2?division=Native+features\u0026amp;title=Platform+and+language\u0026amp;description=Which+OS+and+host+your+app+runs+on%2C+and+the+shell%27s+UI+language.\u0026amp;theme=6a82b949ac7d04df3dad9ac1\u0026amp;signature=b929b68216cc093682e414f40471cdf1de4a91e3d3acdbea79bf965eec6f734e\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Platform and language - cskn Developers\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Which OS and host your app runs on, and the shell\u0026#x27;s UI language.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cskn.mintlify.site/_mintlify/api/og/v2?division=Native+features\u0026amp;title=Platform+and+language\u0026amp;description=Which+OS+and+host+your+app+runs+on%2C+and+the+shell%27s+UI+language.\u0026amp;theme=6a82b949ac7d04df3dad9ac1\u0026amp;signature=b929b68216cc093682e414f40471cdf1de4a91e3d3acdbea79bf965eec6f734e\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"cskn Developers\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0E7490\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cskn.dev/sdk/native/platform-language\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sdk/native/platform-language.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cskn.dev/#organization\",\"name\":\"cskn Developers\",\"url\":\"https://docs.cskn.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cskn/nVnP1SM0RHDt2P4O/logo/light.svg?fit=max\u0026auto=format\u0026n=nVnP1SM0RHDt2P4O\u0026q=85\u0026s=c32921af2ea7b26ed147c2fc20b7ccee\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cskn.dev#website\",\"name\":\"cskn Developers\",\"url\":\"https://docs.cskn.dev\",\"publisher\":{\"@id\":\"https://docs.cskn.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cskn.dev/sdk/native/platform-language#webpage\",\"url\":\"https://docs.cskn.dev/sdk/native/platform-language\",\"name\":\"Platform and language\",\"description\":\"Which OS and host your app runs on, and the shell's UI language.\",\"dateModified\":\"2026-10-08T00:17:52.309Z\",\"isPartOf\":{\"@id\":\"https://docs.cskn.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cskn.dev/sdk/native/platform-language#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cskn.dev/sdk/native/platform-language#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Native features\",\"item\":\"https://docs.cskn.dev/sdk/native/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Platform and language\",\"item\":\"https://docs.cskn.dev/sdk/native/platform-language\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.cskn.dev/sdk/native/platform-language#article\",\"headline\":\"Platform and language\",\"name\":\"Platform and language\",\"description\":\"Which OS and host your app runs on, and the shell's UI language.\",\"url\":\"https://docs.cskn.dev/sdk/native/platform-language\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cskn.dev/sdk/native/platform-language#webpage\"},\"dateModified\":\"2026-10-08T00:17:52.309Z\",\"publisher\":{\"@id\":\"https://docs.cskn.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cskn.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"cskn Developers\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"cskn Developers\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/sdk/native/platform-language.md","siteName":"cskn Developers","nav":{"global":null,"tabs":[{"tab":"Get started","pages":[{"title":"Get started","href":""}]},{"tab":"@cskn/sdk","groups":[{"group":"Overview","pages":[{"title":"@cskn/sdk","href":"/sdk/overview"}]},{"group":"Platform API","pages":[{"title":"API client","href":"/sdk/api-client"},{"title":"User profile","href":"/sdk/user"},{"title":"App data API","href":"/sdk/app-data"},{"title":"Follows","href":"/sdk/follow"},{"title":"AI credits","href":"/sdk/ai-credits"},{"title":"Quotas","href":"/sdk/quotas"},{"title":"Cross-app shares","href":"/sdk/cross-app"},{"title":"Offline queue","href":"/sdk/offline-queue"},{"title":"Image uploads","href":"/sdk/uploads"},{"title":"URLs and routing","href":"/sdk/urls"}]},{"group":"Native features","pages":[{"title":"Native features","href":"/sdk/native/overview"},{"title":"App control","href":"/sdk/native/app-control"},{"title":"System bars","href":"/sdk/native/system-bars"},{"title":"Camera","href":"/sdk/native/camera"},{"title":"QR scanner","href":"/sdk/native/qr-scanner"},{"title":"Video player","href":"/sdk/native/video-player"},{"title":"Image picker","href":"/sdk/native/image-picker"},{"title":"Clipboard","href":"/sdk/native/clipboard"},{"title":"Storage","href":"/sdk/native/storage"},{"title":"Notifications","href":"/sdk/native/notifications"},{"title":"Web Push","href":"/sdk/native/web-push"},{"title":"Share","href":"/sdk/native/share"},{"title":"Haptics","href":"/sdk/native/haptics"},{"title":"Biometrics","href":"/sdk/native/biometrics"},{"title":"Passkeys","href":"/sdk/native/passkeys"},{"title":"Keyboard","description":"Keep inputs visible above the on-screen keyboard in the native shell.","href":"/sdk/native/keyboard"},{"title":"Platform and language","href":"/sdk/native/platform-language"},{"title":"Deep links","description":"Open your app at a route, react to links while it is open, and open other apps.","href":"/sdk/native/deep-links"},{"title":"System pickers and accent","href":"/sdk/native/system-pickers"},{"title":"App messages","href":"/sdk/native/app-messages"}]},{"group":"Profile integration","pages":[{"title":"Widgets","href":"/sdk/widgets"},{"title":"App settings","href":"/sdk/app-settings"},{"title":"Themes","href":"/sdk/themes"},{"title":"Platform menu","href":"/sdk/platform-menu"}]},{"group":"Reference","pages":[{"title":"Bridge protocol","href":"/sdk/bridge-protocol"}]}]},{"tab":"@cskn/ui","pages":[{"title":"@cskn/ui","href":"/ui/overview"}]}]},"basePath":"","title":"Platform and language - cskn Developers","deploymentId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","buildId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","dynamics":[],"chunks":[]}