Git Product home page Git Product logo

Comments (6)

dimsav avatar dimsav commented on August 30, 2024

I don't think other users of the package want to consider the locales en-US and en-GB as the same locale.

I don't want to save 'es-ES' or 'es-CO', I want to save only ES

What you want is too specific to be added to the package.

@sdebacker what do you think?

from laravel-translatable.

sdebacker avatar sdebacker commented on August 30, 2024

What about App::getLanguageLocale() ? That's not managed by Laravel out of the box, so yes it's specific and in my opinion shouldn't be part of Translatable package.

from laravel-translatable.

dimsav avatar dimsav commented on August 30, 2024

@sdebacker has spoken.

from laravel-translatable.

sdebacker avatar sdebacker commented on August 30, 2024

:)

from laravel-translatable.

sangar82 avatar sangar82 commented on August 30, 2024

But this package has the problem I have described.

Imagine a form to enter one registry and have a translated name:
You must enter a value for 'en-GB' and another for 'en-Us', really?

Imagine that I could write:
for en-GB: this is my house
for en-Us: this is my house

This not have sense..

Imagine that I could write:
for en-GB: this is my house
for en-Us: (blank)

and i go to see the frontend with en-Us locale, i see the name as blank, this not have sense enter two times the same for the same language, ...

We need to save in database only one language, in my language files I will have the locales en-GB and en-Us but locales for strings in database has no sense

(sorry for my english)

p.d. @sdebacker App::getLanguageLocale() not exists!!! see my code!!! I don't call this!!

from laravel-translatable.

dimsav avatar dimsav commented on August 30, 2024

@sangar82 you don't have to enter translations two times. You can use the useTranslationFallback parameter.

Example:

class Country {
    protected $useTranslationFallback = 'en-US';
}

In this case you only have to fill the us translations.

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.