Download the PHP package bedita/i18n without Composer

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

I18n plugin for BEdita4 & CakePHP

Github Actions codecov phpstan Scrutinizer Code Quality image image

Installation

You can install this BEdita4/CakePHP plugin using composer like this:

Setup

In order to use the plugin you have to load it in your Application::bootstrap() using

Middleware and Helper

First of all you need to setup an I18n configuration in your application config/bootstrap.php (or if you prefer in config/app_local.php)

I18nMiddleware

Adding BEdita/I18n plugin in app Application::bootstrap() method, the I18nMiddleware will be added in middleware queue just before RoutingMiddleware.

I18n configuration will be used to setup middleware configuration.

You can also decide to not add I18nMiddleware since your app doesn't need it or to programmatically add it in your application:

In this way the middleware just takes care of setup the right locale using the URI path and a configuration. For example navigating to http://example.com/it/page/one the middleware setup locale to it_IT using the above configuration example.

You can configure the middleware to redirect some urls to their i18n versions

All URI paths matching exactly something in 'match' key or starting with one entry in 'startWith' will be redirect to the same URL but with the detected language as prefix, for example /it/help.

You can also configure the middleware to use a cookie to store the locale

I18nRoute

I18nRoute class can be used to simplify the way you write and match routing rules. For example

maps to /:lang/pages and the language code defined in I18n.languages configuration will be used as route patterns on :lang param.

So the above rule is the same of

If the current language is it you can obtain the localized url as

I18nHelper

In order to use the helper you need to initialize it in your AppView::initialize() method

Gettext command

gettext command provides a method to update I18N locale files in BEdita apps and plugins.

A working msgmerge binary on your system is necessary. In most Linux systems this is provided via gettext package.

By simply typing

your code inside /src and /config is parsed and gettext strings are extracted looking for __('Some string') expressions. Then:

Command options:

You may invoke this command on a different application or plugin path via --app or --plugin options.


All versions of i18n with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-intl Version *
cakephp/cakephp Version ^4.2.2
laminas/laminas-diactoros Version ^2.2.2
psr/http-message Version ^1.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.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 bedita/i18n contains the following files

Loading the files please wait ....