Download the PHP package monkeyscloud/monkeyslegion-i18n without Composer

On this page you can find all versions of the php package monkeyscloud/monkeyslegion-i18n. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package monkeyslegion-i18n

MonkeysLegion I18n v2

Production-ready internationalization & localization for the MonkeysLegion PHP framework.

PHP 8.4+ [Tests]() [v2 Standards]()

Translate, pluralize, format numbers/dates/currencies, and manage locales with security and performance at the core. Built with PHP 8.4 property hooks and asymmetric visibility.


Table of Contents


Installation

Requirements

Optional Extensions


Quick Start

Translation File Structure

Example messages.json


Translator

Basic Translation

Parameter Replacement

Pluralization

Supports ICU plural categories for 200+ languages.

Namespaced Translations

Fallback Locale

Missing Translation Tracking

Warm-Up

Pre-load translation groups for production performance:

Property Hooks (PHP 8.4)

Locale Changed Events


MessageFormatter

Parameter Modifiers

Use braced syntax with modifiers for advanced formatting:

XSS Protection


NumberFormatter

Locale-aware number formatting with graceful ext-intl fallback.

Decimal Formatting

Currency Formatting

Compact Notation

Ordinals

Percentage

File Size

Spell Out


DateFormatter

Locale-aware date/time formatting with relative time support.

Named Formats

Relative Time

Diff for Humans

Day and Month Names

ISO 8601


LocaleManager

Manages locale detection, validation, and state.

Detection Chain

Supported Locales

Locale Parsing


LocaleInfo

Static metadata for 50+ locales.

Native Names

RTL Detection

Flag Emojis

Script & Knowledge


Loaders

FileLoader

Loads from JSON and PHP files with security hardening.

DatabaseLoader

Load translations from any SQL database — MySQL, MariaDB, PostgreSQL, and SQLite.

Install the Schema

Ready-to-use SQL files are included in schema/:

Schema (MySQL)

Schema (PostgreSQL)

Schema (SQLite)

Usage

CacheLoader

Decorator that caches translations from any other loader.

CompiledLoader

Opcache-friendly compiled PHP files — 10-50x faster than JSON decode.

MlcLoader

Zero-dependency alternative to YAML — uses a simple key=value format.

MLC file format (flat — one group per file):

MLC file format (sectioned — multiple groups per file):

Why MLC over YAML?


Middleware

LocaleMiddleware

Auto-detect and set locale for each request.

LocaleUrlMiddleware

Extract locale from URL path segment.

LocaleRedirectMiddleware

Auto-redirect to localized URL if locale prefix is missing.


Enums

PluralCategory

Direction


Attributes

[Translatable]

Mark entity properties for automatic translation:

[Locale]

Auto-inject the detected locale into controller parameters:


Events


Template Directives

For use with MonkeysLegion-Template engine:

In templates:


Helper Functions

Global helper functions for convenience:


TranslatorFactory

One-line creation with all features:


Translation Management

Full CRUD management for file and database translations:


CLI Commands


Security

Path Traversal Prevention

Locale Injection Prevention

SQL Injection Prevention

XSS Protection

Cookie Security


Performance

Compiled Loader (Production)

Cache with Jitter

Warm-Up

Const Array Pluralizer


Migration from v1

Namespace Changes

Note: Backward-compatible aliases exist at src/Contracts/aliases.php.

Property Hooks

Locale Validation

Middleware Split


Testing

Test Coverage


License

MIT License. See LICENSE for details.

Built with ❤️ by MonkeysCloud


All versions of monkeyslegion-i18n with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
ext-json Version *
ext-mbstring Version *
psr/http-message Version ^2.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.0
psr/simple-cache Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package monkeyscloud/monkeyslegion-i18n contains the following files

Loading the files please wait ...