Download the PHP package survos/lingua-core without Composer

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

Lingua Core

Lingua Core is a small, framework-agnostic PHP library that defines the canonical identity model for translatable strings.

It is intentionally boring.

There are no translators, no HTTP clients, no queues, and no storage here.
Lingua Core exists to guarantee that every part of a multilingual system agrees on:

This bundle is the lowest layer used by higher-level systems such as Babel, Lingua, and translation servers.


What Lingua Core Is

Lingua Core provides:

If two systems use Lingua Core, they will compute the same keys for the same inputs.


What Lingua Core Is Not

Lingua Core deliberately does not include:

Those belong in higher layers.


Core Concepts

Source Key (str_hash)

A source key uniquely identifies a string in its source language.

It is derived from:

php
use Survos\Lingua\Core\Identity\HashUtil;

$strHash = HashUtil::calcSourceKey(
    'Museum of Things',
    'en'
);

This key is:


Translation Key (tr_hash)

A translation key identifies a translation of a specific source string into a target locale.

It is derived from:

php
$trHash = HashUtil::calcTranslationKey(
    $strHash,
    'es',
    'babel'
);

Namespaces allow multiple translation systems to coexist without schema changes.


Locale Normalization

Locales are normalized consistently to avoid mismatches:

php
HashUtil::normalizeLocale('EN-us'); // 'en'
HashUtil::normalizeLocale('pt_BR'); // 'pt'

This ensures that en, en_US, and en-us do not silently diverge.


Why Hash-Based Identity?

Lingua Core uses content-addressed identity rather than numeric IDs because:

A hash-based key lets you:


Typical Usage (Higher Layers)

Lingua Core is usually consumed indirectly.

Examples:


Design Guarantees

Lingua Core guarantees:


Versioning Policy

If a hash algorithm ever changes, it will be treated as a data migration event, not a refactor.


Installation

bash
composer require survos/lingua-core

Lingua Core has no required dependencies beyond PHP itself.


Philosophy

Translation is not about strings.
It is about identity.

Lingua Core exists so everything else can be opinionated, flexible, and replaceable—without ever disagreeing on what is being translated.


All versions of lingua-core with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
ext-mbstring Version *
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 survos/lingua-core contains the following files

Loading the files please wait ...