> For the complete documentation index, see [llms.txt](https://docs.venuecms.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.venuecms.com/developers/sdk-next/reference/functions/getlocalizedcontent.md).

# getLocalizedContent

[**@venuecms/sdk-next**](/developers/sdk-next/reference/index.md)

***

## Function: getLocalizedContent()

```ts
function getLocalizedContent(localizedContent, locale): object
```

Defined in: [sdk/dist/index.d.mts:828](https://github.com/venuecms/sdk/blob/fccd7a6c5d53db66655878a682d412275fbffc69/packages/sdk/dist/index.d.mts#L828)

This function will properly resolve content blocks that are localized. It takes in the array of localized content and returns the proper content to be used in your page.

### Parameters

| Parameter          | Type                                                                                                    |
| ------------------ | ------------------------------------------------------------------------------------------------------- |
| `localizedContent` | `undefined` \| [`LocalizedContent`](/developers/sdk-next/reference/type-aliases/localizedcontent.md)\[] |
| `locale`           | `string`                                                                                                |

### Returns

`object`

| Name            | Type                                                                                  | Defined in                                                                                                                                   |
| --------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `content`       | [`LocalizedContent`](/developers/sdk-next/reference/type-aliases/localizedcontent.md) | [sdk/dist/index.d.mts:829](https://github.com/venuecms/sdk/blob/fccd7a6c5d53db66655878a682d412275fbffc69/packages/sdk/dist/index.d.mts#L829) |
| `currentLocale` | `string`                                                                              | [sdk/dist/index.d.mts:830](https://github.com/venuecms/sdk/blob/fccd7a6c5d53db66655878a682d412275fbffc69/packages/sdk/dist/index.d.mts#L830) |

### Example

```typescript
import { getEvent, getLocalizedContent } from "@venuecms/sdk";
import { ContentRender, type RenderNode } from "@/lib/utils/renderer";

// let's assume we are looking at an event and want to show the locale-specific title of that event in english
const { data: event } = await getEvent({ slug });

// Use getLocalizedContent to retrieve all localized content in the correct locale
// typically you will pass a locale from your app (such as from a i18n library) but
// for clarity I am passing "en" explicitly to retrieve the english version
const { content } = getLocalizedContent(event.localizedContent, "en");

// Render the content in english using the renderer
return (
  <div>
    <VenueContent classes={renderedStyles} content={content} />
  </div>
);
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.venuecms.com/developers/sdk-next/reference/functions/getlocalizedcontent.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
