2017 © Pedro Peláez
 

package fcphp-i18n

Internationalization i18n

image

00f100/fcphp-i18n

Internationalization i18n

  • Saturday, June 16, 2018
  • by 00F100
  • Repository
  • 1 Watchers
  • 2 Stars
  • 60 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 9 % Grown

The README.md

FcPhp i18n

Build Status codecov Total Downloads, (*1)

How to install

Composer:, (*2)

$ composer require 00f100/fcphp-i18n

or add in composer.json, (*3)

{
    "require": {
        "00f100/fcphp-i18n": "*"
    }
}

How to use

<?php

$default = 'pt-br';
$translate = [
    'pt-br' => [
        'My name is %s' => 'Meu nome é %s',
    ],
    'en' => [
        'My name is %s' => 'My name is %s',
    ],
    'es' => [
        'My name is %s' => 'Mi nombre és %s',
    ],
];
__i18n_configure($default, $translate);
$name = 'João';
$text = 'My name is %s';

// Print: Meu nome é João
echo __($text, $name);

// Print: Meu nome é João
echo _i18n_translate($text, $name);

The Versions

16/06 2018

dev-master

9999999-dev https://github.com/00f100/fcphp-i18n

Internationalization i18n

  Sources   Download

The Requires

  • php >=7.0

 

The Development Requires

i18n fcphp nternationalization

11/06 2018

0.1.1

0.1.1.0 https://github.com/00f100/fcphp-i18n

Internationalization i18n

  Sources   Download

The Requires

  • php >=7.0

 

The Development Requires

i18n fcphp nternationalization