evo-mark/inertia-i18n

Internationalisation support for Inertia projects

Maintainers

👁 evomark

Package info

github.com/evo-mark/inertia-i18n

Homepage

Language:JavaScript

pkg:composer/evo-mark/inertia-i18n

Statistics

Installs: 1 911

Dependents: 3

Suggesters: 0

Stars: 3

Open Issues: 0

v3.1.1 2026-04-28 23:55 UTC

Requires

None

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 11c435dfef691471653dc84d513336cd1c7fc331

  • Craig Riley <c.riley.woop@evomark.co.uk>

i18ntranslationinternationalisationlocalelanguagelaravellocalizationinternationalizationlocalisationvueinertiavitevue3

This package is auto-updated.

Last update: 2026-06-29 00:31:31 UTC


README

👁 evoMark company logo

👁 Build status
👁 Total Downloads
👁 License

Inertia I18n

Upgrading from V2

Please see the CHANGELOG.md file for upgrade instructions

Installation

composer require evo-mark/inertia-i18n
npm install ./vendor/evo-mark/inertia-i18n

pnpm add file:vendor/evo-mark/inertia-i18n
import InertiaI18n from "inertia-i18n/vite";

export default {
	plugins: [
		InertiaI18n({
			// langDirectory: resolve(process.cwd() + "/lang"),
			// outputDirectory: resolve(process.cwd() + "/lang/json"),
		}),
	],
};
import { inertiaI18nVue } from "inertia-i18n/vue";

createInertiaApp({
	withApp(app) {
		app.use(inertiaI18nVue);
	},
});

Config

You can publish the config, if necessary, with Artisan:

php artisan v:p --tag=inertia-i18n

Your path should match the outputDirectory in your Vite plugin config (default /lang)

Usage

After installation, you can use your frontend localisation package as usual:

<template>
	<div>{{ $t('messages.hello_world') }}</div>
</template>

OR

<script setup>
import { useI18n } from 'vue-i18n';

const { t } = useI18n();
const translated = computed(() => t('message.hello_world));
</script>

See the documentation for the respective frontend packages for more information:

Vue: vue-i18n