Skip to content

docs(react-native): document setAppLanguage() - #22285

Merged
turnipdabeets merged 2 commits into
masterfrom
docs/react-native-set-app-language
Nov 13, 2026
Merged

turnipdabeets merged 2 commits into
masterfrom
docs/react-native-set-app-language

Conversation

@turnipdabeets

Copy link
Copy Markdown
Contributor

Changes

Documents posthog.setAppLanguage() from posthog-react-native 4.86.0 (PostHog/posthog-js#5601), in a new "Setting the app language" section of the React Native library page.

  • setAppLanguage() sets $app_language, the language the app displays, on every event. Events carry no $app_language until it's called, because the SDK can't see a language the app translates in JavaScript.
  • Pass a BCP 47 tag, or null to stop sending it. The value is in memory only, survives reset(), and a register()ed $app_language takes precedence.

This section was in #20922. It moved here because 4.86.0 has shipped and #20922 waits for @posthog/react-native-plugin 3.0. #20922 links to this section's anchor, so merge this first.

Checklist

  • I've read the docs and/or content style guides.
  • Words are spelled using American English
  • Use relative URLs for internal links
  • I've checked the pages added or changed in the Vercel preview build
  • If I moved a page, I added a redirect in vercel.json (n/a)

🤖 Generated with Claude Code

@github-actions github-actions Bot added docs Improvements or additions to product documentation, "Docs" content PR only touches files under contents/ labels Nov 12, 2026
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Vale prose linter → found 0 errors, 46 warnings, 10 suggestions in your markdown

Full report → Copy the linter results into an LLM to batch-fix issues.

Linter being weird? Update the rules!

contents/docs/libraries/react-native/index.mdx — 0 errors, 46 warnings, 10 suggestions
Line Severity Message Rule
6:18 warning Use 'GitHub' instead of 'github'. Vale.Terms
6:37 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
42:82 warning Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. PostHogBase.ProductNames
46:3 warning 'CocoaPods' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
61:12 warning 'podspec' is a possible misspelling. PostHogBase.Spelling
63:1 warning 'CocoaPods with *********** through Swift Package Manager' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
88:6 warning 'Full Swift Package Manager' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
100:244 warning 'podspec's' is a possible misspelling. PostHogBase.Spelling
121:168 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
122:125 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
124:157 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
133:254 warning 'Backgrounded' is a possible misspelling. PostHogBase.Spelling
134:171 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
135:129 warning Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. PostHogBase.ProductNames
136:109 warning Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. PostHogBase.ProductNames
138:150 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
142:171 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
170:19 warning 'Backgrounded' is a possible misspelling. PostHogBase.Spelling
170:78 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
173:24 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
174:42 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
211:119 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
324:274 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
328:5 warning '$set' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
334:5 warning '$set_once' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
336:75 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
359:49 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
361:23 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
373:69 warning Avoid trivializing words. 'simply' can sound dismissive to the reader. PostHogDocs.Trivializers
432:10 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
432:94 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
432:103 warning Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. PostHogBase.ProductNames
503:17 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
505:89 warning 'refetches' is a possible misspelling. PostHogBase.Spelling
536:8 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
536:55 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
536:128 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
538:28 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
538:54 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
546:4 warning Capitalize 'Error Tracking' for PostHog's product. Use 'Error tracking' for the general industry concept. PostHogBase.ProductNames
546:4 warning 'Error tracking' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
548:11 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
548:52 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
577:132 warning 'symbolication' is a possible misspelling. PostHogBase.Spelling
614:163 warning Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. PostHogBase.ProductNames
657:12 warning Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. PostHogBase.ProductNames
661:4 warning Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. PostHogBase.ProductNames
661:4 warning 'Session replay' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
663:12 warning Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. PostHogBase.ProductNames
663:74 warning Avoid trivializing words. 'all you need to do' can sound dismissive to the reader. PostHogDocs.Trivializers
663:133 warning Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. PostHogBase.ProductNames
667:11 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
677:62 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
677:100 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
679:126 warning Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. PostHogBase.ProductNames
727:4 warning 'Upgrading from V1, V2 to V3 or V3 to V4' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview Nov 13, 2026 09:21PM

Changed pages

Page Source
React Native contents/docs/libraries/react-native/index.mdx

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Bundle report

Total JS (gzip)

12.22 MiB (+161.0 KiB / +1.3%)

Largest changed named chunks
Chunk Gzip Δ vs master
f2dbc74af55ca99cdd38582a532e602146695d29.js 126.9 KiB new
e01beff9.js 77.9 KiB new
d1c09c67.js 68.4 KiB new
b3896404911e2bb789a64cebda263affb5a7eaef.js 49.0 KiB new
832eca2bd90f47d6886052db15970a4309b6d1e4.js 24.2 KiB new
bee98676a804cfae257c1a3b0f0275ad4a219da8.js 16.4 KiB new
d1ee37382485a75581197e428f3a15631c2de6cc.js 8.6 KiB new
0ac16b2a4f38f0508692f6e9f203b6550e76aac2.js 8.5 KiB new
aa5bd93166710ce0ee5edfad64efa881dce87ccb.js 7.0 KiB new
c1191f4ccc50033564d1c9c6a1d0e5b0510ecb9b.js 6.2 KiB new
component---src-pages-pocket-guides-index-tsx.js 5.1 KiB new
1844cf53199445c5eb131ee91a2619418f65e92a.js 4.8 KiB new
9757105925b78de0fdc3be7115b114870d101154.js 4.4 KiB new
app.js 1130.5 KiB +4.4 KiB / +0.4%
07816912cceddafd64f68cbf72485376f5c1ff3f.js 4.3 KiB new

Eager graph (modules shipped in each entrypoint's initial chunks)

Entrypoint Eager size Budget Modules
✅ app 11.15 MiB (+759.0 KiB / +7.1%) report-only 1106
Largest modules in the app closure
Module Size
css ./node_modules/.pnpm/css-loader@5.2.7_webpack@5.101.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[1]!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.5.6_webpack@5.101.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[2]!./src/styles/global.css 1023.1 KiB
./src/components/Stickers/Stickers.tsx 696.4 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/puzzle.mjs 388.5 KiB
./node_modules/.pnpm/@posthog+icons@0.36.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js 354.8 KiB
./node_modules/.pnpm/react-markdown@8.0.7_@types+react@16.14.66_react@18.3.1/node_modules/react-markdown/lib/react-markdown.js + 88 modules 351.4 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/basketball-coach.mjs 337.4 KiB
./node_modules/.pnpm/framer-motion@14.0.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs + 126 modules 287.2 KiB
./node_modules/.pnpm/cloudinary-core@2.14.0_lodash@4.17.21/node_modules/cloudinary-core/cloudinary-core.js 281.9 KiB
./src/components/SearchUI/index.tsx + 87 modules 273.1 KiB
./gatsby-browser.tsx + 60 modules 259.4 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/construction-1.mjs 248.5 KiB
./src/components/Pricing/PricingSlider/Slider.tsx + 87 modules 240.2 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/construction-2.mjs 228.2 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/magnifying-glass.mjs 221.7 KiB
./src/hooks/useProduct.ts + 18 modules 166.5 KiB

Eager-graph budgets are report-only until a baseline is established. Sizes are gzip of public/**/*.js; eager size is webpack module source bytes for the modules actually shipped in the entrypoint's initial chunks (post-tree-shake).

@turnipdabeets turnipdabeets added the stamphog Request AI approval (no full review) label Nov 13, 2026
@turnipdabeets
turnipdabeets requested a review from a team November 13, 2026 18:30

@dustinbyrne dustinbyrne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation matches the shipped 4.86.0 SDK. One optional correction would keep the i18next change listener aligned with the resolved display language.

AI-assisted review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@turnipdabeets
turnipdabeets enabled auto-merge (squash) November 13, 2026 21:04
@turnipdabeets
turnipdabeets merged commit 99588a8 into master Nov 13, 2026
24 checks passed
@turnipdabeets
turnipdabeets deleted the docs/react-native-set-app-language branch November 13, 2026 21:22
@github-project-automation github-project-automation Bot moved this from New to Done in PostHog.com planning Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

content PR only touches files under contents/ docs Improvements or additions to product documentation, "Docs" stamphog Request AI approval (no full review)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants