Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vuejs and $t #62

Open
piep14 opened this issue May 3, 2024 · 0 comments
Open

Vuejs and $t #62

piep14 opened this issue May 3, 2024 · 0 comments

Comments

@piep14
Copy link

piep14 commented May 3, 2024

Hello,

I'm using the laravel-vue-i18n package.

I put my configuration file like this :

'search' => [
        /**
         * Directories which should be looked inside.
         */
        'dirs' => [
            'app',
            'resources',
            'routes',
        ],

        /**
         * Subdirectories which will be excluded.
         * The values must be relative to the included directory paths.
         */
        'exclude' => [
            'vendor/cookie-consent',
        ],

        /**
         * Patterns by which files should be queried.
         * The values can be a regular expression, glob, or just a string.
         */
        'patterns' => ['*.php', '*.vue'],

        /**
         * Functions that the strings will be extracted from.
         * Add here any custom defined functions.
         * NOTE: The translation string should always be the first argument.
         */
        'functions' => ['__', 'trans', '@lang', 'trans_choice', '$t']
    ],

And yet, it doesn't bring out the values in me, such as:
<label for="new-message" class="form-label">{{ $t('Add a new message for this travel') }} :</label>

I also had to ignore the spatie/laravel-cookie-consent package because it crashes due to the following strings:
{!! trans('cookie-consent::texts.message') !!}

Thank you for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant