artgris / FileManagerBundle

FileManager is a simple Multilingual File Manager Bundle for Symfony
MIT License
171 stars 89 forks source link

Change the translation #136

Closed elliotlgn closed 5 months ago

elliotlgn commented 6 months ago

Hello, i'd like to change the translation english to french, how can i do that ? Thanks !

xDeSwa commented 6 months ago

I assume you set the symfony language to fr open folder 'ArtgrisFileManagerBundle' in root/translations. then create messages.fr.yml file or copy original file to here

like this root/translations/ArtgrisFileManagerBundle/messages.fr.yml

elliotlgn commented 6 months ago

First thanks a lot for you answer !

But it doesn't work if I do : /var/www/Project/translations/ArtgrisFileManagerBundle/messages.fr.yml

I don't need to change a configuration to use message.fr.yml instead of message.en.yml ?

I mean directly into the vendor ?

xDeSwa commented 6 months ago

bundle already has fr.yml in vendor/artgris/filemanager-bundle/Resources/translations/messages.fr.yml

you want override?

elliotlgn commented 6 months ago

No i don't, i just want to use it

xDeSwa commented 6 months ago

parameters: locale: 'fr' in config/services.yaml

elliotlgn commented 6 months ago

doesn't work i've never use translation before, maybe i have to change something first ?

Maybe because my Default and fallback locale are set to "en" ?

xDeSwa commented 6 months ago

if you didnt install translation bundle before;

composer require symfony/translation

elliotlgn commented 6 months ago

i've already installed it

xDeSwa commented 6 months ago

check config/packages/translations.yaml

framework: default_locale: '%locale%' translator: default_path: '%kernel.project_dir%/translations' fallbacks:

elliotlgn commented 6 months ago

Yess thanks a lot !