zerospam / laravel-gettext

Adds localization support to laravel applications using PoEdit and GNU-Gettext.
99 stars 56 forks source link

Laravel 9 update #58

Closed ruaq closed 1 year ago

ruaq commented 2 years ago

added support for Laravel 9.x

solves #56

waqleh commented 2 years ago

can someone merge this and create a new tag?

eartahhj commented 2 years ago

As of today I can't install the package on Laravel 9 with composer require zerospam/laravel-gettext because it will return this error:

- Root composer.json requires zerospam/laravel-gettext ^8.0 -> satisfiable by zerospam/laravel-gettext[8, 8.0.1, 8.0.2].
- zerospam/laravel-gettext[8, ..., 8.0.2] require laravel/framework ^6.0 || ^7.0 || ^8.0 -> found laravel/framework[v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but it conflicts with your root composer.json require (^9.19).

I guess I could manually fix it somehow but I'd rather wait for official compatibility to avoid problems.

aaronmeder commented 2 years ago

Would be great if this could be merged...we're also upgrading our app to Laravel 9 and this is blocking the process atm.

Any Updates on this? @zerospam

frizikk commented 1 year ago

Any Updates on this? @zerospam

netbbe commented 1 year ago

Any updates on this? @zerospam

DjeboDigital commented 1 year ago

Any updates on this? @zerospam

KamilMerkandi commented 1 year ago

Any updates on this? @zerospam

RonJeremyR6 commented 1 year ago

How can I 'composer require' these changes? I am not very well known into Github. @ruaq ?

ruaq commented 1 year ago

How can I 'composer require' these changes?

My workaround was to change my composer.json

from

"require": {
        "zerospam/laravel-gettext": "^8.0"
    },

to

"repositories": [
        {
            "type": "git",
            "url": "https://github.com/prevplan/laravel-gettext"
        }
    ],
"require": {
        "zerospam/laravel-gettext": "dev-patch-1"
    },

See https://github.com/prevplan/courserv.io/commit/989dec992174bd1543f920c1aa329629e33d8d5f#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34 for example.

evifere commented 1 year ago

any update on this ?

ruaq commented 1 year ago

Since my temp workaround is nearly a year old, there wasn’t a reaction in any kind of @zerospam neither here nor anywhere else in the repos and Laravel 10 is already on the horizon, I would offer to fork it entirely and release a working version for composer.

Opinions? Other offers?

eartahhj commented 1 year ago

I guess the alternative would be to just configure the default gettext without using this package, maybe the only issue could rise when trying to parse blade views where u use for example {{ _('String') }}, xgettext and msgfmt might not be able to get it. You could try something like this: Generating PO files with Laravel & translating Blade templates And for local environment I can suggest my gettext guide for Windows

ruaq commented 1 year ago

@nekhbet has also forked it and will maintain it for its own longtime projects. So I’ll change to this fork. See comment https://github.com/zerospam/laravel-gettext/issues/56#issuecomment-1374922286 and repo https://github.com/nekhbet/laravel-gettext