Laravel-Lang / publisher

Publisher provides functionality for working with application localization
https://laravel-lang.com/packages-publisher.html
MIT License
212 stars 25 forks source link

How to install a localization from laravel-lang/lang ? #200

Closed realtebo closed 2 years ago

realtebo commented 2 years ago

Description:

How to install italian locale?

I have installed both

    "laravel-lang/lang": "~8.0",
    "laravel-lang/publisher": "^11.1",

I want to simply install/expose/use italian localizations

I am not able to do understand how to do

Steps To Reproduce:

I also tried a locale:add it but it creates new empty file for italian locales

I tried also running locale:update but nothing changes

mohamedsabil83 commented 2 years ago

Don't install both of them as laravel-lang/publisher install the proper version of laravel-lang/lang under the hood. maybe that causes the issue. try to remove laravel-lang/lang

realtebo commented 2 years ago

I read in the doc here:; https://laravel-lang.github.io/publisher/using/plugins/index.html

Install the package into your application. For example, composer require laravel-lang/lang --dev

I removed vendor I removed explicit dev dependency of laravel-lang/lang I run composer:upgrade

Installed these

Downloading laravel-lang/lang (10.1.12) Downloading laravel-lang/publisher (v11.1.12)

I run php artisan locale:add it

It worked

There is something wrong in the laravel-lang/lang installation instructions.

This page: https://laravel-lang.github.io/lang/installation/composer.html

Should tell users to do not use it directly, and also should have version numbers updated.

andrey-helldar commented 2 years ago

@realtebo, I'll update the documentation soon :)

The https://laravel-lang.github.io/lang/installation/composer.html documentation describes the installation process without a publisher

realtebo commented 2 years ago

It could be usefull to say: install THEN manually copy files :)

andrey-helldar commented 2 years ago

@realtebo, in version 11.1.5 I wanted to remove the lang package from the publisher, but in patch 11.1.6 I brought it back.

Just run composer update.

andrey-helldar commented 2 years ago

It could be usefull to say: install THEN manually copy files :)

https://laravel-lang.github.io/lang/installation/files.html :)

image

realtebo commented 2 years ago

Please, don't hate me. It's only that install in the 'list' mode tells user that must choose one of 4 methods

nothing helps user to understand that AFTER installing using composer/github/svn must always copy files. I suggest to replace the list and 5 pages with a more clear and simple paragraph. Just and idea.

andrey-helldar commented 2 years ago

I agree. https://github.com/Laravel-Lang/lang/pull/1942