Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Loco Importer Bundle

Loco Importer Bundle Laravel Package

purjus/loco-importer-bundle

A Symfony bundle for importing translations from Loco into your application. It streamlines pulling localization data from the Loco API into your project's translation files. Early-stage package with limited adoption; a useful starting point for Loco-to-Symfony translation sync.

View on GitHub
Deep Wiki
Context7

Import Localise.biz (Loco) translations in your Symfony project

Frequently asked questions about Loco Importer Bundle
Is purjus/loco-importer-bundle a Laravel package or a Symfony bundle?
It is a Symfony bundle. It registers itself through Symfony's DependencyInjection extension and console application, and it writes to Symfony's translations directory conventions. There is no Laravel service provider, no config publish path, and no Artisan command registration, so Laravel's package discovery has nothing to hook into.
Can I install purjus/loco-importer-bundle in a Laravel application?
Not realistically. Composer will likely refuse to resolve its Symfony 4/5-era and Guzzle 6-era constraints alongside Laravel 10 or 11, which require Symfony 6/7 components and Guzzle 7. Even if you force the install, the bundle expects a Symfony kernel to boot, which a Laravel app does not provide. The practical answer is to extract the Loco export logic rather than install the bundle.
How do I import Loco translations into Laravel without this package?
Call Loco's export API directly from a small Artisan command such as php artisan loco:pull, using an API key stored in config/services.php and your .env file. Loco exposes stable per-format and per-locale export endpoints, so you can request output as PHP arrays or JSON that Laravel consumes natively. The integration is well bounded and typically only a few hundred lines.
What Laravel and PHP versions is this bundle compatible with?
The last release was February 2020, placing it in the PHP 7.x and Symfony 4-5 era with Guzzle 6. That combination is not compatible with a current Laravel app running PHP 8.2 or 8.3 on Symfony 6/7 components and Guzzle 7. Expect Composer conflicts, and treat installation into a modern stack as a non-option.
Is purjus/loco-importer-bundle still maintained?
No. The last release was 2020-02-04, it has one star and zero dependents, and there is no visible test suite or recent activity. That means no downstream bug discovery, no patches, and nobody validating it against Loco's current API. The low adoption score reflects an unmaintained, unadopted package rather than a hidden gem.
How does the bundle authenticate with the Loco API?
Authentication is configured through Symfony parameters and environment variables rather than Laravel's config/services.php pattern. The exact environment variable names, and whether any retry or backoff behaviour exists, are not documented in the available material. Inspect the service class directly before relying on any assumption about API key handling.
Does the importer merge translations or overwrite existing files?
The available documentation does not state whether it merges into existing translation files or overwrites them wholesale. This matters because overwrite behaviour silently discards local-only keys, while merge behaviour leaves keys deleted upstream orphaned in your project. With no visible test coverage of the file-writing logic, verify this yourself on a scratch branch before trusting it.
Will it preserve Laravel placeholder and pluralization syntax?
It is written to emit Symfony translation formats, so Laravel-specific conventions like :placeholder interpolation, {0} {1} pluralization ranges, and JSON-key versus nested-array layout are not guaranteed. If you reuse the writer, add tests asserting those conventions survive a round trip. Translation file corruption tends to fail silently at runtime, which is the main risk here.
Can I fork the package and reuse its Loco API client in Laravel?
Yes, and with roughly 100 to 300 lines of relevant code that is the sensible path. Copy the Loco API client and file-writing service, discard the DI extension and console wiring, then wrap it in a Laravel service provider and an Artisan command with --locale and --dry-run options. Accept that you now own maintenance and pin your own Guzzle 7 dependency.
What are the best alternatives for syncing Loco translations with Laravel?
The strongest alternative is a thin in-house importer that hits Loco's export endpoint, because Loco already speaks PHP arrays and JSON. You can also fork this bundle and strip the Symfony scaffolding, or evaluate actively maintained translation management packages that ship a Laravel driver. A full port of this bundle is not warranted at its code volume.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle