Localization
Override reusable ARCUI-owned accessibility and built-in behavior strings at runtime.
ARCUI keeps reusable library-owned strings separate from design tokens and separate from application content.
Configure partial overrides through the root provider:
import { ARCUI } from "react-native-arc-ui";
<ARCUI
strings={{
modalCloseAccessibilityLabel: "Close",
headerBackAccessibilityLabel: "Back",
selectSearchPlaceholder: "Search",
selectEmptyLabel: "No results",
}}
>
{/* application */}
</ARCUI>;String overrides are partial and runtime-reactive.
Public string keys
| Key | Default |
|---|---|
modalCloseAccessibilityLabel | "Close modal" |
headerBackAccessibilityLabel | "Go back" |
inputClearAccessibilityLabel | "Clear input" |
inputPasswordShowAccessibilityLabel | "Show password" |
inputPasswordHideAccessibilityLabel | "Hide password" |
inputOTPAccessibilityLabel | "One-time code" |
inputNumberDecrementAccessibilityLabel | "Decrease value" |
inputNumberIncrementAccessibilityLabel | "Increase value" |
selectSearchPlaceholder | "Search options" |
selectEmptyLabel | "No results found" |
sliderAccessibilityLabel | "Slider" |
sliderLowerAccessibilityLabel | "Minimum value" |
sliderUpperAccessibilityLabel | "Maximum value" |
Use application localization infrastructure
ARCUI does not impose an i18n library. Resolve the active locale in the application, then pass the appropriate ARCUI string object:
const arcuiStrings = locale === "de"
? de.arcui
: en.arcui;
<ARCUI strings={arcuiStrings}>
{children}
</ARCUI>;Because strings are runtime-reactive, changing locale does not require a token remount.
Read resolved strings in custom extensions
import { useARCUIStrings } from "react-native-arc-ui";
function CustomControl() {
const strings = useARCUIStrings();
return (
<Pressable accessibilityLabel={strings.inputClearAccessibilityLabel}>
{/* custom visual */}
</Pressable>
);
}Use this when a custom ARCUI-compatible composition intentionally reuses a library-owned meaning.
Public defaults and types
import {
defaultStrings,
type TARCUIStrings,
type TARCUIStringsOverride,
} from "react-native-arc-ui";defaultStrings is useful when application localization infrastructure wants the complete built-in key set as a starting point.
What belongs here
Use provider strings for reusable wording ARCUI itself owns, especially:
- accessibility labels for built-in icon actions;
- built-in Select search/empty wording;
- Slider labels owned by the component contract.
Application content remains application-owned. Screen titles, business messages, validation copy, button labels, and product-specific strings should stay in the application's localization system.