Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Custom language files

    General Discussion
    3
    5
    664
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      ottopodo last edited by

      I'm trying to override language files.
      I added several translations strings and I need to have custom laguage for frontend.
      Where do I have to place my custom language files?
      Thank you

      1 Reply Last reply Reply Quote 0
      • S
        shivam-webkul last edited by

        Hi @ottopodo ,
        can you please mention the framework version. ?

        Thanks

        1 Reply Last reply Reply Quote 0
        • R
          rahul last edited by

          Hello @ottopodo

          First of all, create a package for it, create lang files in this package and override that view files which languages need to be change.

          Now in overridden view, use your translation and remove the shop translation.

          Note - You need to declare type hint for your translation in your service provider.

          O 1 Reply Last reply Reply Quote 0
          • O
            ottopodo last edited by

            Hi @shivam-webkul,
            Bagisto 1.1 and Laravel 6.18.1

            1 Reply Last reply Reply Quote 0
            • O
              ottopodo @rahul last edited by ottopodo

              @rahul Thank you I added:
              $this->loadTranslationsFrom(DIR . '/../Resources/lang', 'shop');
              to my service provider Boot Method and my language files in package Resources/lang and it works. 👍

              1 Reply Last reply Reply Quote 0
              • First post
                Last post