> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LocaleResource

<Card title="Recommended: JavaScript SDK with React Hooks" icon="react" color="#4779FE">
  For new React apps, we recommend the JavaScript SDK with React Hooks (`@dynamic-labs-sdk/react-hooks`) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the [React quickstart (JavaScript SDK)](/javascript/reference/react-quickstart) to get started.
</Card>

An object used with the locale prop on DynamicContextProvider, you can find a tutorial on how to use this type [here](/react/using-our-ui/design-customizations/customizing-copy-translations).

## Properties

The key of the object must be one of the following valid "lang"s:

\| "ar"
\| "da"
\| "de"
\| "en"
\| "es"
\| "fi"
\| "fr"
\| "he"
\| "it"
\| "ja"
\| "nl"
\| "pl"
\| "pt"
\| "ru"
\| "uk"
\| "zh"

The value of the object must be a valid translation object - see below.

### Translations

The translation object should follow the shape found in "@dynamic-labs/sdk-react-core/src/lib/locale/en/translation.js" which you can reach by going to the definition of LocaleResource in your IDE once imported (`import { LocaleResource } from '@dynamic-labs/sdk-react-core'`)

Here is an example excerpt from that file:

```jsx theme={"system"}
    dyn_account_exists: {
        connect: 'Connect with {{socialOauth}}',
        description: 'It looks like an account already exists using',
        title: 'Account already exists',
        trail_message_email: '. Please log in with your email.',
        trail_message_social: 'through {{socialOauth}}',
    },
```
