Git Product home page Git Product logo

Comments (8)

dimsav avatar dimsav commented on July 26, 2024 1

I agree with @sdebacker, you can do whatever you want with Config::set('app.locales', []), preferably in a service provider.

Sorry but your use case is too specific to be included in this package. Feel free to create an extension or something.

Cheers :)

from laravel-translatable.

sdebacker avatar sdebacker commented on July 26, 2024

Why not use Config::set('app.locales', […]) somewhere in your app ?

from laravel-translatable.

wisepotato avatar wisepotato commented on July 26, 2024

What I'm suggesting is having more flexibility. Both the current option + a dynamic option. Where you can even have 'active' languages, those that can be disabled in the backend of an application for instance.

I would suggest normalising, as in using a 'language_id' in models to pinpoint to specific languages, this would also help in cascading deletion where if you delete a language, all models pertaining to said language would also be deleted.

from laravel-translatable.

sdebacker avatar sdebacker commented on July 26, 2024

One reason I like this package is that it's small with one responsibility. Perhaps making another package that extends laravel-translatable should make sense ? What do you think ?

from laravel-translatable.

wisepotato avatar wisepotato commented on July 26, 2024

Fair point, Then I would suggest events for this package for easy hooking...I would gladly create this package.

from laravel-translatable.

wisepotato avatar wisepotato commented on July 26, 2024

Is it really so specific though? Normalising the languages to a database? Ill be writing a package to extend this one but still

from laravel-translatable.

dimsav avatar dimsav commented on July 26, 2024

By adding the languages to the database you add extra complexity which is rarely needed. Let's keep the package simple and open for extension.

from laravel-translatable.

daverdalas avatar daverdalas commented on July 26, 2024

@wisepotato If you are still looking for a solution for your problem or someone in the future will look, you can see my fork: https://github.com/daverdalas/laravel-translatable

from laravel-translatable.

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.