RC
Getting Started Guide API Examples Community
  • Essentials
    • Hello world
  • App
    • Error Handling
    • Plugins
    • Teleport
  • Auto Imports
    • Components
    • Composables
  • Composables
    • useAsyncData
    • useCookie
    • useFetch
    • useHead
    • useState
  • Routing
    • Layouts
    • Middleware
    • <NuxtLink>
    • Pages
    • Universal Router
  • Server
    • Server Routes
  • Advanced
    • Config extends
    • Module Extend pages
    • Testing
  • Experimental
    • Reactivity Transform
    • Wasm
  • Other
    • Locale
  • Essentials
    • Hello world
  • App
    • Error Handling
    • Plugins
    • Teleport
  • Auto Imports
    • Components
    • Composables
  • Composables
    • useAsyncData
    • useCookie
    • useFetch
    • useHead
    • useState
  • Routing
    • Layouts
    • Middleware
    • <NuxtLink>
    • Pages
    • Universal Router
  • Server
    • Server Routes
  • Advanced
    • Config extends
    • Module Extend pages
    • Testing
  • Experimental
    • Reactivity Transform
    • Wasm
  • Other
    • Locale

Locale

This example shows how to define a locale composable to handle the application's locale, both server and client side.

💡
You can right-click to "View Page Source" and see that Nuxt renders the correct date in SSR based on the visitor's locale.
Loading Sandbox...

Experimental Wasm
Community Getting Help
Twitter GitHub

Nuxt 2 documentation