@@ -23,6 +23,7 @@ yarn add @devwizard/laravel-localizer-vue
2323```
2424
2525** Backend (Composer):**
26+
2627``` bash
2728composer require devwizardhq/laravel-localizer
2829php artisan localizer:install --framework=vue
@@ -167,18 +168,18 @@ const { translations, locale } = useTranslation();
167168
168169Returns an object with the following properties and methods:
169170
170- | Property | Type | Description |
171- | ----------| ------| -------------|
172- | ` __ ` | ` (key, replacements?, fallback?) => string ` | Main translation function |
173- | ` trans ` | ` (key, replacements?, fallback?) => string ` | Alias for ` __ ` |
174- | ` lang ` | ` (key, replacements?, fallback?) => string ` | Alias for ` __ ` |
175- | ` has ` | ` (key) => boolean ` | Check if translation key exists |
176- | ` choice ` | ` (key, count, replacements?) => string ` | Pluralization support |
177- | ` locale ` | ` ComputedRef<string> ` | Current locale code (reactive) |
178- | ` dir ` | ` ComputedRef<'ltr' \| 'rtl'> ` | Text direction (reactive) |
179- | ` availableLocales ` | ` ComputedRef<Record<string, LocaleInfo>> ` | Available locales with metadata (reactive) |
180- | ` translations ` | ` ComputedRef<Record<string, string>> ` | All translations for current locale (reactive) |
181- | ` getLocales ` | ` () => string[] ` | Get all available locale codes |
171+ | Property | Type | Description |
172+ | ------------------ | ------------------------------------------- | ---------------------------------------------- |
173+ | ` __ ` | ` (key, replacements?, fallback?) => string ` | Main translation function |
174+ | ` trans ` | ` (key, replacements?, fallback?) => string ` | Alias for ` __ ` |
175+ | ` lang ` | ` (key, replacements?, fallback?) => string ` | Alias for ` __ ` |
176+ | ` has ` | ` (key) => boolean ` | Check if translation key exists |
177+ | ` choice ` | ` (key, count, replacements?) => string ` | Pluralization support |
178+ | ` locale ` | ` ComputedRef<string> ` | Current locale code (reactive) |
179+ | ` dir ` | ` ComputedRef<'ltr' \| 'rtl'> ` | Text direction (reactive) |
180+ | ` availableLocales ` | ` ComputedRef<Record<string, LocaleInfo>> ` | Available locales with metadata (reactive) |
181+ | ` translations ` | ` ComputedRef<Record<string, string>> ` | All translations for current locale (reactive) |
182+ | ` getLocales ` | ` () => string[] ` | Get all available locale codes |
182183
183184## Vite Plugin Options
184185
@@ -227,8 +228,8 @@ The package is fully typed. Generated translation files include TypeScript defin
227228``` typescript
228229// Generated by localizer:generate
229230export const en = {
230- " welcome" : " Welcome" ,
231- " validation.required" : " This field is required" ,
231+ welcome: ' Welcome' ,
232+ ' validation.required' : ' This field is required' ,
232233} as const ;
233234
234235export type TranslationKeys = keyof typeof en ;
0 commit comments