# General Translation React SDKs (gt-react, gt-next, gt-react-native): getLocalizeHref
URL: https://generaltranslation.com/ja/docs/react/nextjs/reference/functions/get-localize-href.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: async なサーバーコードで App Router のパスをローカライズします。getLocalizeHref の API リファレンスです。

`getLocalizeHref` 関数は、リクエストのロケールを使用し、[`useLocalizeHref`](/docs/react/nextjs/reference/hooks/use-localize-href) と同じ関数に解決されます。`gt-next/server` から import して使用します。

## 概要 [#overview]

```tsx title="app/[locale]/cart/page.tsx"
import { getLocalizeHref } from 'gt-next/server';
import { Button } from '@/components/Button';

export default async function CartPage() {
  const localizeHref = await getLocalizeHref();
  return <Button href={localizeHref('/checkout')}>Checkout</Button>;
}
```

## 戻り値 [#returns]

**型** `Promise<(href: string, locale?: string | false) => string>`

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
