Download the PHP package elcheco/translator without Composer

On this page you can find all versions of the php package elcheco/translator. 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 translator

ElCheco Translator

Downloads this Month License

A powerful and flexible translation library for PHP applications with support for both NEON files and database storage, featuring full Unicode CLDR plural rules support.

Features

What's New in Version 2.0

Requirements

Installation

Configuration

Basic Configuration (Nette DI)

NEON File-Based Translations

Database-Based Translations

CLDR Plural Rules Support

The translator now supports the Unicode CLDR (Common Locale Data Repository) standard for plural rules, providing linguistically correct pluralization for all languages.

What are CLDR Plural Rules?

CLDR defines standardized categories for plural forms:

CLDR vs Legacy Format

The translator supports both formats simultaneously:

Legacy Format (still supported):

CLDR Format (recommended):

Special Case: Czech Decimals

Czech (and Slovak) use the many category specifically for decimal numbers:

This ensures grammatically correct output:

Usage

In Presenters or Services

In Templates (Latte)

Direct Usage in PHP

NEON Translation Files

Translation files support both legacy and CLDR formats:

Simple Translations

Legacy Plural Format

CLDR Format (Recommended)

Command Line Tools

Import Translations from NEON to Database

Export Translations from Database to NEON

Convert Legacy Translations to CLDR Format (NEW!)

Database Structure

The database schema has been enhanced to support CLDR:

Number Formatting

The translator automatically formats numbers according to locale:

Migration Guide

Migrating to CLDR Format

  1. Automatic Detection: The translator automatically detects and handles both formats
  2. Gradual Migration: You can migrate translations one by one
  3. Migration Tool: Use the console command to convert existing translations

Example Migration

Before (Legacy):

After (CLDR):

Advanced Features

Custom Plural Rules

Usage Tracking (Database Only)

Testing

Language Support

The translator includes built-in CLDR plural rules for 100+ languages, including:

Examples

E-commerce Site

Weather App

Changelog

Version 2.0.0

Version 1.x

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Ensure all tests pass
  5. Submit a pull request

License

MIT License

Credits

Inspired by rostenkowski/translate, enhanced with:

Support

For questions and support:


All versions of translator with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
ext-intl Version *
ext-tokenizer Version *
dibi/dibi Version ^v5.0
nette/di Version ^3.1
nette/neon Version ^3.0
nette/safe-stream Version ^2.4|^3.0
nette/utils Version ^3.0|^4.0
psr/log Version ^3.0
symfony/console Version ^7.2
latte/latte 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 elcheco/translator contains the following files

Loading the files please wait ....