Download the PHP package wubinworks/module-translation without Composer

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

Story

(Everything talked here is for Magento 2.4. See Requirements Section.)

This module, which provides 2 features, is designed as a dependency for making other modules/themes.

  1. During deployment, Magento scans static .js and .html files and picks up translatable strings from them.\ Then Magento generates a js-traslation.json file.\ This file is a dictionary file used for frontend translation,\ For example: <!-- ko i18n: 'Translate Me!' --><!-- /ko -->\ Unfortunately, translatable strings in .phtml(and .php) files are not picked up by Magento(for some reasons).\ If $.mage.__('Some Text') is in .phtml files, it won't be translated.\ This module can force extra data from a separate file(i.e., [module or theme root]/i18n/Js/[locale].csv) to go to js-traslation.json.

  2. Magento loads translation data in the order below:

Then these translation data are merged and the merge rule is "LAST ONE WINS", which means Database translation overrides everything else.\ However, In some cases, especially when doing local development to translate very general phrases in specific business field, the Module creator wants to override Language Pack and Theme translations without modifying those third party packages.\ This module adds extra locations for translation files(CSV), so the loading order becomes:

 |  Module translation: [module root]/i18n/[locale].csv

 |  Language Pack translation

 |  Theme translation: [theme root]/i18n/[locale].csv

 |  Database translation

 |  Extra Module translation: [module root]/i18n/i18n/[locale].csv

\|/ Extra Theme translation: [theme root]/i18n/i18n/[locale].csv(last-one-wins)

This module works under Store Emulation, too.

Usage and Example

1. Append(merge) translation into js-traslation.json:\ Create <module or theme root>/i18n/Js/<locale>.csv like a normal translation CSV file, then its content will go to js-traslation.json(even the phrase cannot be found as a translatable string in static files).

2. Override Language Pack or Theme translations:\ Create [module or theme root]/i18n/i18n/[locale].csv like a normal translation CSV file, then it will work.

Check examples of this module inside the i18n folder.

i18n/ja_JP.csv

i18n/i18n/ja_JP.csv

i18n/Js/ja_JP.csv

i18n/i18n/Js/ja_JP.csv

Output:

Output in js-translation.json:

Requirements

Magento 2.4

Installation

composer require wubinworks/module-translation


All versions of module-translation with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
magento/framework Version *
magento/magento2-base Version ~2.4.0
magento/module-backend Version *
magento/module-translation 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 wubinworks/module-translation contains the following files

Loading the files please wait ....