• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

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

How can i do RTL this?

General Discussion
2
8
1.1k
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 8 Aug 2019, 06:43

    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 8 Aug 2019, 07:33

      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 8 Aug 2019, 08:52

        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 8 Aug 2019, 09:26

          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 8 Aug 2019, 09:55

            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 8 Aug 2019, 10:07

              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 8 Aug 2019, 10:28

                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 10 Aug 2019, 05:40 8 Aug 2019, 12:22

                  I find it and created fa language.

                  You can see to this page.

                  1 Reply Last reply Reply Quote 0
                  3 out of 8
                  • First post
                    3/8
                    Last post