Skip to content

aymericzip/intlayer-skills / skills/intlayer-usage

intlayer-usage

Verified

Provides general guidelines for using Intlayer in any project. Use when the user asks to "get started with Intlayer", "declare content files", or understand the "project structure" for internationalization.

FileKindSize
LICENCE.mdmarkdown10.7 KB
SKILL.mdskill md3.6 KB
references/concept_how-works-intlayer.mdmarkdown28.7 KB
references/concept_per-locale-file.mdmarkdown7.6 KB
references/get-started.mdmarkdown26.6 KB
references/packages_intlayer_comparePaths.mdmarkdown5.0 KB
references/packages_intlayer_exports.mdmarkdown12.4 KB
references/packages_intlayer_getCanonicalPath.mdmarkdown3.4 KB
references/packages_intlayer_getConfiguration.mdmarkdown4.1 KB
references/packages_intlayer_getDictionary.mdmarkdown4.9 KB
references/packages_intlayer_getDictionaryAsync.mdmarkdown6.3 KB
references/packages_intlayer_getEnumeration.mdmarkdown3.3 KB
references/packages_intlayer_getHTMLTextDir.mdmarkdown2.3 KB
references/packages_intlayer_getIntlayer.mdmarkdown8.7 KB
references/packages_intlayer_getIntlayerAsync.mdmarkdown6.8 KB
references/packages_intlayer_getLocale.mdmarkdown1.1 KB
references/packages_intlayer_getLocaleLang.mdmarkdown1.9 KB
references/packages_intlayer_getLocaleName.mdmarkdown3.5 KB
references/packages_intlayer_getLocalizedPath.mdmarkdown6.8 KB
references/packages_intlayer_getLocalizedUrl.mdmarkdown9.3 KB
references/packages_intlayer_getMultilingualUrls.mdmarkdown8.7 KB
references/packages_intlayer_getPathWithoutLocale.mdmarkdown1.6 KB
references/packages_intlayer_getPrefix.mdmarkdown6.0 KB
references/packages_intlayer_getTranslation.mdmarkdown3.4 KB
references/packages_intlayer_validatePrefix.mdmarkdown1.0 KB
references/packages_react-intlayer_exports.mdmarkdown13.7 KB
references/packages_vite-intlayer_exports.mdmarkdown6.0 KB
references/packages_vite-intlayer_intlayer.mdmarkdown6.0 KB
references/packages_vite-intlayer_intlayerCompiler.mdmarkdown4.2 KB
references/packages_vite-intlayer_intlayerMinify.mdmarkdown3.9 KB
references/packages_vite-intlayer_intlayerProxy.mdmarkdown7.0 KB
references/packages_vite-intlayer_intlayerPrune.mdmarkdown4.7 KB
references/why.mdmarkdown58.2 KB

references/packages_intlayer_getPathWithoutLocale.md

View on GitHub
---
createdAt: 2025-08-23
updatedAt: 2026-09-27
priority: 5
title: getPathWithoutLocale Function Documentation | intlayer
description: "Use getPathWithoutLocale to remove the locale segment from a URL or pathname, for both absolute URLs and relative paths."
keywords:
  - getPathWithoutLocale
  - translation
  - Intlayer
  - intlayer
  - Internationalization
  - Documentation
  - Next.js
  - JavaScript
  - React
slugs:
  - doc
  - packages
  - intlayer
  - getPathWithoutLocale
history:
  - version: 5.5.10
    date: 2025-06-29
    changes: "Init history"
author: aymericzip
---

# Documentation: `getPathWithoutLocale` Functions in `intlayer`

## Description

Removes the locale segment from the given URL or pathname if present. It works with both absolute URLs and relative pathnames.

## Parameters

- `inputUrl: string`
  - **Description**: The complete URL string or pathname to process.
  - **Type**: `string`

- `locales: Locales[]`
  - **Description**: Optional array of supported locales. Defaults to the configured locales in the project.
  - **Type**: `Locales[]`

## Returns

- **Type**: `string`
- **Description**: The URL string or pathname without the locale segment.

## Example Usage

```typescript codeFormat={["typescript", "esm", "commonjs"]}
import { getPathWithoutLocale } from "intlayer";

console.log(getPathWithoutLocale("/dashboard")); // Output: "/dashboard"
console.log(getPathWithoutLocale("/en/dashboard")); // Output: "/dashboard"
console.log(getPathWithoutLocale("/fr/dashboard")); // Output: "/dashboard"
console.log(getPathWithoutLocale("https://example.com/en/dashboard")); // Output: "https://example.com/dashboard"
```
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 197kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall