Support the ongoing development of Laravel.io →
Configuration Views Forms
Last updated 2 years ago.
0

I'm not 100% sure what you mean, but I recently started on a translation manager for Laravel: https://github.com/barryvdh/laravel-translation-manager

All this does is:

  • Import the translation files (app/lang/<locale>/<group>.php) into a database.
  • Create a webinterface to make faster/logical translations (with a inline edit / ajax save)
  • Export the language files by writing them back to the php files.

But it is still young, looking the improve it, so use with caution.

Last updated 2 years ago.
0

Thank you for your response. Your package looks interesting and I will keep a look on it :)

What I want for now is a tool to extract all "trans('messages.xxx');" or "Lang::get" from the code and add them to the translation-files automatically. Maybe by running a command like "php artisan language:parse" all keys found in the code are merged into the existing translation-file. (Equally to gettext-tools like PoEdit where you can parse your code for translations which are added to the catalog automatically).

Last updated 2 years ago.
0
Solution

Solution for now: I wrote myself a facade that is using Zend\i18n to translate from mo-Files.

Last updated 2 years ago.
0

Okay, that is planned for my package, but now it can only swap the translator and listen to missing keys.

What did you do now exactly? You can swap out the Translator and use a different Translator (Symfony also has po/mo translators), but how do you detect the translation codes from the file? Do you use _($string) or gettext($string) instead?

Last updated 2 years ago.
0

Hi, very interesting your package barryvdh!! If you continue its development, I'm sure I'll use it! :)

Last updated 2 years ago.
0

Hi i tried to export the translation without a composer: Artisan::call('translations:export',['labels']); but it doesn't work

0

Sign in to participate in this thread!

Eventy

Your banner here too?

disup disup Joined 4 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.