Giter VIP home page Giter VIP logo

Comments (10)

mlantz avatar mlantz commented on May 18, 2024

I'll need a bigger description of this, can you provide example urls and some screenshots possibly. Its hard to isolate exactly what isnt working correctly for you.

from cms.

Mariana-Marica avatar Mariana-Marica commented on May 18, 2024

I provide steps and screenshot with problem encountered:

  • i have set in app.php 'locale' => 'fr', and 'fallback_locale' => 'en', & in quarx.php the following:
    'auto-translate' => true,
    'default-language' => 'fr',
    'languages' => [
        'fr' => 'français',
        'en' => 'english',
    ],
  • i create a page 'test-page' and then, after submit i am on the same page, on edit case;
  • after submit the url has no lang param regarding the actual language i am positioned on (it's just quarx/pages/{id}/edit with no language) and the highlighted language tab is always the last one, in my case 'english';
  • on create and update if i write some content, it will be saved for first language, 'french' in my case, although english tab is active; if i don't specifically click a language tab, the url will not appear with corresponding lang param '?lang=fr' and the corresponding lang tab is not highlighted;
    edit

from cms.

mlantz avatar mlantz commented on May 18, 2024

Awesome, thanks, replicating this setup - I'm getting the same issue, I'll see what I can fix today

from cms.

mlantz avatar mlantz commented on May 18, 2024

K, solved it, there were a couple issues. Will be pushing update today

from cms.

Mariana-Marica avatar Mariana-Marica commented on May 18, 2024

Thank you !

from cms.

Mariana-Marica avatar Mariana-Marica commented on May 18, 2024

I still see the same behavior !

from cms.

mlantz avatar mlantz commented on May 18, 2024

What version do you have in the bottom corner? and did you replace your resources/views/vendor/quarx views?

from cms.

Mariana-Marica avatar Mariana-Marica commented on May 18, 2024

I updated the dependencies just today and i have the latest Quarx version 2.3.21. I don't really know what exactly to replace, why and where, can you give more info on this pls ?

from cms.

Mariana-Marica avatar Mariana-Marica commented on May 18, 2024
  • yes, i should have published the vendor by running 'php artisan vendor:publish' that replaces resources/views/vendor/quarx with the ones from project_name/vendor/yab/quarx/src/Views;
  • it now works for default quarx modules, but i can mention that after creating a new module, the language tabs from custom module edit in admin panel are still loaded the same (because of Quarx::config('quarx.languages')) instead of config('quarx.languages'))):
        <ul class="nav nav-tabs">
            @foreach(config('quarx.languages', Quarx::config('quarx.languages')) as $short => $language)
                <li role="presentation"
                    @if (request('lang') == $short || is_null(request('lang')) && $short == Quarx::config('quarx.default-language'))) class="active" @endif>
                    <a href="{{ url('quarx/blogcategories/'.$blogcategory->id.'/edit?lang='.$short) }}">{{ ucfirst($language) }}</a>
                </li>
            @endforeach
        </ul>

from cms.

mlantz avatar mlantz commented on May 18, 2024
@foreach(config('quarx.languages') as $short => $language)
    <li role="presentation" @if (request('lang') == $short || is_null(request('lang')) && $short == config('quarx.default-language'))) class="active" @endif><a href="{{ url('quarx/blog/'.$blog->id.'/edit?lang='.$short) }}">{{ ucfirst($language) }}</a></li>
@endforeach

This should be accurate. I have not yet made a means of setting modules as multilingual but its on my todo list.

You will also need to make sure your module uses Yab\Quarx\Traits\Translatable also check out the BlogRepository and look at the update method to make sure you're saving the languages

from cms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.