Skip to main content
You are viewing Pre-Alpha documentation.
Vuetify0 LogoVuetify0 Logo
Theme
Mode
Palettes
Accessibility
Vuetify One

Sign in to Vuetify One

Access premium tools across the Vuetify ecosystem — Bin, Play, Studio, and more.

Not a subscriber? See what's included

Locale

A headless component that scopes a locale to a subtree. Descendant useLocale() calls resolve to the specified locale without affecting the rest of the application.


RenderlessIntermediateMar 25, 2026

Usage

Wrap any section of your template in <Locale> to override the active locale for that subtree. Children calling useLocale() will see the scoped locale as the current selection.

vue
<script setup lang="ts">
  import { Locale } from '@vuetify/v0'
</script>

<template>
  <Locale locale="fr">
    <!-- Everything here sees "fr" as the active locale -->
    <slot />
  </Locale>
</template>

Anatomy

Anatomy
<script setup lang="ts">
  import { Locale } from '@vuetify/v0'
</script>

<template>
  <!-- Wrapper mode (default) -->
  <Locale locale="fr">
    <div>French-scoped content</div>
  </Locale>

  <!-- Renderless mode -->
  <Locale locale="es" renderless v-slot="{ attrs }">
    <section v-bind="attrs">Custom element</section>
  </Locale>
</template>

Examples

Scoped Override

Nest <Locale> components to create layered locale contexts. Each card reads its scoped locale independently via useLocale().

FileRole
LocaleCard.vueConsumer — reads useLocale() to display translated content
LocaleSection.vueWrapper — uses <Locale> to scope a locale to a section
scoped-override.vueEntry — sets up locales and nests scoped overrides

Root context (en)

Englishen

Hello — Welcome to our app

3 items selected

Goodbye, World!

Scoped to French
Françaisfr

Bonjour — Bienvenue dans notre application

3 éléments sélectionnés

Au revoir, World !

Nested Spanish
Españoles

Hola — Bienvenido a nuestra aplicación

3 elementos seleccionados

¡Adiós, World!

Independent Spanish scope
Españoles

Hola — Bienvenido a nuestra aplicación

3 elementos seleccionados

¡Adiós, World!

Renderless Mode

When renderless is set, the component does not render a wrapper element. Instead, it passes attrs (including data-locale and lang) via the slot scope for you to bind to your own element:

vue
<script setup lang="ts">
  import { Locale } from '@vuetify/v0'
</script>

<template>
  <Locale locale="fr" renderless v-slot="{ attrs }">
    <section v-bind="attrs">
      No extra wrapper div
    </section>
  </Locale>
</template>

API Reference

The following API details are for all variations of the Locale component.

Locale

Props

locale required

string

Locale ID to scope to

renderless

boolean

Skip wrapper element, pass attrs via slot

Default: false

as

DOMElement

Wrapper element tag

Default: "div"

Slots

default

LocaleSlotProps
Was this page helpful?

© 2016-1970 Vuetify, LLC
Ctrl+/