Can't seem to get trans to work
See original GitHub issueI’m using Vue 3 with composition API and while $t and $tChoice both function perfectly, I can’t seem to get trans or transChoice to function properly. It’s as if it’s using a different configuration from $t and $tChoice. Thus no language strings are loaded.
It may just be a case of me doing something very wrong, as I work with Vue 2 daily and this is my first Vue 3 Composition API project.
Just in case it's important, here's the app.js file that I use
require('./bootstrap');
import { createApp, h } from 'vue';
import { createInertiaApp } from '@inertiajs/inertia-vue3';
import { InertiaProgress } from '@inertiajs/progress';
import { i18nVue } from 'laravel-vue-i18n';
const appName = window.document.getElementsByTagName('title')[0]?.innerText || 'Laravel';
createInertiaApp({
title: (title) => `${title} - ${appName}`,
resolve: (name) => require(`./Pages/${name}.vue`),
setup({ el, app, props, plugin }) {
return createApp({ render: () => h(app, props) })
.use(plugin)
.use(i18nVue, {
resolve: lang => import (`../lang/${lang}.json`),
})
.mixin({ methods: { route } })
.mount(el);
},
});
InertiaProgress.init({ color: '#4B5563' });
Issue Analytics
- State:
- Created 2 years ago
- Comments:41 (22 by maintainers)
Top Results From Across the Web
Being transgender at work - McKinsey
Although corporate America has stepped up its public support of LGBTQ rights, it still has a long road ahead to foster a truly...
Read more >4 Ways To Make Your Workplace Equitable For Trans People
No matter where you work, being openly trans on the job can be tough — and it's simply not safe for many trans...
Read more >I Think I Might Be Transgender, Now What Do I Do ... - CT.gov
Transgender people also include those who identify as “genderqueer,” gender neutral, and/or gender-free—people who may not identify as either male or female.
Read more >The truth about trans - Stonewall
Can you be trans and gay? So, could a lesbian have a trans woman as a lesbian partner, or a gay man be...
Read more >Finding Jobs and Finding Justice for Trans Workers
As a transgender woman, Hoole had dealt with discrimination before, and she was not the only one to face that struggle. The US...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The tl;dr that worked for me after going through this thread is to change your
trans
function calls towTrans
:Thanks for the help debugging @A-Ghorab 💪.