Download the PHP package alex-kalanis/kw_langs without Composer

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

kw_langs

Build Status Scrutinizer Code Quality Latest Stable Version Minimum PHP Version Downloads License Code Coverage

Define used translations inside the KWCMS tree. Parse them and return them.

PHP Installation

(Refer to Composer Documentation if you are not familiar with composer)

Package info

This package contains example file from KWCMS bootstrap. Use it as reference.

This lang bootstrap is connected with KWCMS modules. Using it outside KWCMS means you need to know the tree structure of module system and positioning langs there.

The idea is about translations which are separated just by their key (in single namespace).

The basic language file itself is simple php file with defined array variable "$lang" in which are stored key-value pairs like in normal php array. You do not need to specify module - it will be automatically set into content array when language loads.

It's also possible to use your own loader which will read your translation files by your own rules. So you can connect reading translations from get_text module files and that all will still behave the same way. Just it's need to respect that loader's input is module and lang name and output is array of key-value pairs which will be set into translation array. Beware! Previously set translations can be overwritten!

For your own modules and for staying things separated my advice is to have lang key in form of _"{module_name}.{keyitself}" - with dot as separator and module name as prefix.

Example:

For ['your internal system key' => 'output is %s, on %d']

And it returns 'output is first param, on 2'

The best usage is inside the translations classes across the other modules - you just fill with your keys to your translations. It is possible to make a whole class which returns the wanted translations which will be instance of and then pass it into lang loader.


All versions of kw_langs with dependencies

PHP Build Version
Package Version
Requires alex-kalanis/kw_paths Version >=4.0 <5
alex-kalanis/kw_routed_paths Version >=3.0 <4
php Version >=7.4.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 alex-kalanis/kw_langs contains the following files

Loading the files please wait ....