Login form - Translation of error messages



  • Hello,
    I am trying to translate Bagisto to Japanese and I found the place that I have some difficulties to do it.
    Just for the record, I am using the Laravel eCommerce Hide Shop for Guest extention.
    .env

    APP_TIMEZONE=Asia/Tokyo
    APP_LOCALE=ja
    

    I already translate some part of the system without problem.
    I added at the /bagisto/resources/lang/ja/validation.php for Japanese language, but the message error is in English as the following :
    LoginErrorMsgTranslation.png
    Please, could someone guide me where I can translate the error message?
    Thank you very much!



  • To resolve your issue just the follow the step
    go to your shop->src->resources->js->app.js and following line import ja from 'vee-validate/dist/locale/ja'; just after line no 4

    then replace your Vue.use function with the below one

    Vue.use(VeeValidate, {
    dictionary: {
    ar: ar,
    de: de,
    ja: ja,
    },
    events: 'input|change|blur',
    });

    after that you have to run npm i and npm run watch in the shop package.



  • Hey @shaiv-webkul,
    I'm using Bagisto with docker, so do you know how i must to proceed to configure npm on file docker-compose.yml?
    And after that which is the command to do execute it?
    Like:

    docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'npm i'"
    
    docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'npm run watch'"
    

    How to redirect to folder shop package?
    Thank you



  • Hello!
    Did you get some solution for my difficult?
    Thank you !



  • you have to run below command

    docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'cd bagisto_installation_directory && npm i'"

    docker exec -i apache2 bash -c "su - www-data -s /bin/bash -c 'cd bagisto_installation_directory && npm run watch'"



  • Still having the same problem, but with the admin errors translation, I changed the locale, but without success

    webkul/admin/src/resources/assets/js/app.js

    Snímek obrazovky 2020-05-13 v 20.19.48.png



  • @sebastian
    change the default locale from .env and run php artisan config:cache


Log in to reply