Download the PHP package oviedev/toungette without Composer

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

Toungette

code cov code cov code cov\ Small and simple PHP library for translating websites

Introduction

Toungette is a PHP library used to simplify translating your website. You only need 3 files to make it work, and you still have full control over your translations without any need to create the same page twice, but with different text.

Installation

Before you install it, in your composer.json add "minimum-stability": "rc". That's because there is no version of simplehtmldom that is stable (at least on packagist). After you did so, use:\ composer require oviedev/toungette

Documentation

You can view documentation here: Documentation

How to use

Let's make a simple website with one page.\ Setup 3 files. schem.json, index.tounge and index.php.\ \ schem.json is where you define your translations. At the beggining of the file, you need to define schema property. It's an array of avaible languages.\ Next you have the keys object. It stores your translations as arrays. Values of the keys are ordered via schema. So let's define two keys. key.hello and key.goodbye

\ Let's move to the index.tounge. This is where you define, how your page will look. It's plain html, but you start with the <body> tag, instead of <html>. So our file may look like this:

Notice that our keys are in curly braces. \ \ Now, it's time for our index.php file. This is where the translation magic comes in. It contains every standard tag required for the website (<html> and <head>), excluding <body>

In that <?php tag we create a Translator object and we pass here our schem.json and index.tounge as parameters. Then we call translate() method and we echo it out. \ \ Now go to enter your website's url and add parameter lang=en, lang=es or lang=pl. This should be the result:

English Translation Spanish Translations Polish Translations \ \ Congratulations, you've made your first website with Toungette


All versions of toungette with dependencies

PHP Build Version
Package Version
Requires simplehtmldom/simplehtmldom Version 2.0-RC2
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 oviedev/toungette contains the following files

Loading the files please wait ...