New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

hyperf/translation

An independent translation component, forked by illuminate/translation.
2,476,842 7

Larablocks Analysis

hyperf/translation works with any PHP project: the latest release (v3.2.0, Jun 7, 2026) doesn't depend on Laravel.

Recommendation checks

Solid choice

Solid choice: maintained and up to date, meets 2 of 3 checks; below the bar for Recommended on use.

  • Released in the last 12 months (Jun 7, 2026)
  • 54,316 downloads a month (at least 10,000)
  • 7 GitHub stars (needs 100)

State

Maintained
  • Last stable release: Jun 7, 2026.
  • 1 release in the last 12 months.
  • First released: Aug 27, 2019.
  • Monthly downloads: 54,316, up 26% from six months ago.
  • 2 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.

Install
composer require hyperf/translation
Latest Version:v3.2.0
PHP:>=8.2
License:MIT
Last Updated:Jun 7, 2026
Links: GitHub  ·  Packagist
Maintainer: hyperf

Hyperf Translation

hyperf/translation 组件衍生于 Laravel Translation 组件的,我们对它进行了一些改造,大部分功能保持了相同。在这里感谢一下 Laravel 开发组,实现了如此强大好用的 Translation 组件。

Installation

composer require hyperf/translation

Configuration

Publish config

php bin/hyperf.php vendor:publish hyperf/translation

Config files:

+ ./config/autoload/translation.php

Configuration

<?php
declare(strict_types=1);

return [
    'locale' => 'en',   
    'fallback_locale' => '',
    'path' => BASE_PATH . '/storage/languages', 
];

Usage

$container = ApplicationContext::getContainer();
$translator = $container->get(\Hyperf\Contract\TranslatorInterface::class);
$translator->trans('validation.accepted');

Related Packages

hyperf/scout

Hyperf Scout provides a driver based solution to searching your Eloquent models....

195,433 6
limingxinleo/i-encryption

Illuminate Encryption for Hyperf

650 6
onix-systems-php/hyperf-inertia

The Hyperf adapter for Inertia.js.

250 4
jmiy/hyperf-i-cache-3-2

Illuminate Cache for Hyperf

47 0
logobinder/translations

Translation trait

25 0

Version History

Version Released PHP License
v3.2.0 >=8.2 MIT
v3.1.63 >=8.1 MIT
v3.1.57 >=8.1 MIT
v3.1.42 >=8.1 MIT
v3.1.35 >=8.1 MIT
Pre-releases (13)
Version Released PHP License
v3.2.0-alpha.3 >=8.2 MIT
v3.2.0-alpha.1 >=8.2 MIT
v3.1.0-rc.11 >=8.1 MIT
v3.1.0-rc.4 >=8.1 MIT
v3.1.0-alpha.1 >=8.1 MIT