Bagisto Forum

    Bagisto

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

    How can i do RTL this?

    General Discussion
    2
    8
    1076
    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.
    • H
      hChamran last edited by

      I met this package recently. in descriptions was said this package can be Rtl but when i tried do it, i couldn't find about this topic in document. can some one help me?

      1 Reply Last reply Reply Quote 0
      • N
        Naresh-webkul last edited by

        Hi,
        @hChamran , To Use RTL you have to follow these steps:

        1.create your local from the admin pannel .
        Goto: Settings->Locales->add locale

        addlocale.png

        2.then you have to assign locale to channel of your shop .
        goto : Settings->Channels->edit your channel and assign newly created locale

        assigntochannes.png

        1. final step , select the local from the shop:

        addselectlocal.png

        thanks
        Naresh Verma

        1 Reply Last reply Reply Quote 0
        • H
          hChamran last edited by

          Hi,
          @Naresh-webkul , thank you for your help but i want to dashboard and all of items in dashboard become rtl too!

          1 Reply Last reply Reply Quote 0
          • N
            Naresh-webkul last edited by

            Hello
            @hChamran , you have to override the single line of code in your package by following :
            Goto: config Folder->app.php file.,
            in app.php file overide this line :
            'locale' => 'en' with your locale(like - 'locale' => 'ar').

            thanks
            Naresh verma

            1 Reply Last reply Reply Quote 0
            • H
              hChamran last edited by

              thanks @Naresh-webkul.
              And for changing language from 'arabic' to 'persian' what should i do?
              I thinking i should create a new folder with name 'fa' and 'app.php' file inside it.

              1 Reply Last reply Reply Quote 0
              • H
                hChamran last edited by

                I find it

                I should add this code:

                app()->getLocale() == 'fa'
                

                to packages/Admin/src/resources/view/layouts/master.blade.php

                <body @if (app()->getLocale() == 'ar') class="rtl" @endif>
                

                at last

                <body @if (app()->getLocale() == 'ar' || app()->getLocale() == 'fa') class="rtl" @endif>
                

                thanks

                1 Reply Last reply Reply Quote 0
                • N
                  Naresh-webkul last edited by

                  yes and ,just create the folder (like- ar) ,and inside it create app.php file in the resource ->lang folder.
                  In app.php file write your translation for that language.
                  after that override 'locale' => 'en' with your locale(like - 'locale' => 'ar') from your config->app.php file.

                  thanks.

                  1 Reply Last reply Reply Quote 0
                  • H
                    hChamran last edited by hChamran

                    I find it and created fa language.

                    You can see to this page.

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