Coder Social home page Coder Social logo

Localization Support about filament-fabricator HOT 8 CLOSED

z3d0x avatar z3d0x commented on June 22, 2024
Localization Support

from filament-fabricator.

Comments (8)

Z3d0X avatar Z3d0X commented on June 22, 2024

I don't think this package is compatible with spatie translatable

from filament-fabricator.

MaartenJC avatar MaartenJC commented on June 22, 2024

It actually works great except for this problem. So would it be an option to modify te code from:
$pageUrls = FilamentFabricator::getPageUrls();
to:
$pageUrls = FilamentFabricator::getPageUrls($locale);

from filament-fabricator.

Z3d0X avatar Z3d0X commented on June 22, 2024

Ok I will look in to this for future updates

from filament-fabricator.

Nestoran avatar Nestoran commented on June 22, 2024

Has this been implemented already? Any news on this?

from filament-fabricator.

Voltra avatar Voltra commented on June 22, 2024

Hi there! I have been able to use Spatie Translatable with Fabricator.

I've done this by simply overriding FilamentFabricatorManager#setPageUrl as well as the routing and the route parameter binding. Just to ensure everything works smoothly, I also added a locale detector middleware.

from filament-fabricator.

Voltra avatar Voltra commented on June 22, 2024

I've made a gist for that: https://gist.github.com/Voltra/191666f4af51e42528e54bfc682661e9

from filament-fabricator.

Z3d0X avatar Z3d0X commented on June 22, 2024

@Voltra I'd be open to a PR on this as a opt-in feature. (eg: needs to be enabled in the config to use it)

from filament-fabricator.

Z3d0X avatar Z3d0X commented on June 22, 2024

As described in this comment #119 (comment) localization is better off as a project side configuration

from filament-fabricator.

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.