# Pass locale into symbol Content component

**URL:** <https://forum.builder.io/t/pass-locale-into-symbol-content-component/5885>\
**Category:** Bugs\
**Created:** [June 28, 2024, 9:01am UTC](https://forum.builder.io/t/pass-locale-into-symbol-content-component/5885 "2024-06-28T09:01:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![etienne](https://avatars.discourse-cdn.com/v4/letter/e/9fc348/32.png) [@etienne](https://forum.builder.io/u/etienne)\
**Post date:** [June 28, 2024, 9:01am UTC](https://forum.builder.io/t/pass-locale-into-symbol-content-component/5885/1 "2024-06-28T09:01:27Z")

</div>

Hello,  
I’m using NextJs and the component.  
I’m trying to pass the locale to the page symbols by setting “Inherit state” to true but it seems the symbol is not translated.  
Also the targeting doesn’t seem to work

 ![chrome_d0CD2nGvFu](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/4/46a067aa3618cfa04ca29131be5277754301a133.png)

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [June 28, 2024, 10:33am UTC](https://forum.builder.io/t/pass-locale-into-symbol-content-component/5885/2 "2024-06-28T10:33:05Z")

</div>

Hello @etienne,

Welcome to the [builder.io](http://builder.io) forum post.

Make sure you’re correctly passing the locale as a state parameter to the `BuilderComponent` . Here is an example setup:

```auto
import { BuilderComponent, builder } from '@builder.io/react';
import { useRouter } from 'next/router';

// Replace with your Public API Key
builder.init('YOUR_API_KEY');

export default function Page(props) {
  const { locale } = useRouter();

  // Fetch content based on locale
  return (
    <>
      <MyHeader />
      <BuilderComponent
        model="page"
        content={props.page}
        data={{ locale }}
      />
      <MyFooter />
    </>
  );
}

export async function getStaticProps(context) {
  const page = await builder.get('page', {
    options: { locale: [{ value: context.locale }] },
    userAttributes: { urlPath: context.asPath },
  }).promise();

  return {
    props: {
      page,
      locale: context.locale,
    },
    revalidate: 1,
  };
}

export async function getStaticPaths() {
  return {
    paths: [],
    fallback: true,
  };
}

```

For more details, refer to the [Localization Integrate Guide](https://www.builder.io/c/docs/localization-integrate) and [Targeting Cheatsheet](https://www.builder.io/c/docs/targeting-cheatsheet).

---

<div class="post-metadata">

**Author:** ![etienne](https://avatars.discourse-cdn.com/v4/letter/e/9fc348/32.png) [@etienne](https://forum.builder.io/u/etienne)\
**Post date:** [July 10, 2024, 8:25am UTC](https://forum.builder.io/t/pass-locale-into-symbol-content-component/5885/3 "2024-07-10T08:25:28Z")

</div>

Thank you for your answer
