amiranagram/localizator

Vuejs and $t

Opened this issue · 0 comments

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