2017 © Pedro Peláez
 

library name-translation

package to translate names with one of the two ways 1.Rosette 2.Google Translate

image

yamsafer/name-translation

package to translate names with one of the two ways 1.Rosette 2.Google Translate

  • Tuesday, August 22, 2017
  • by yamsafer
  • Repository
  • 24 Watchers
  • 2 Stars
  • 4,699 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 16 % Grown

The README.md

name-translation

Transliterate the names in your content, don’t translate., (*1)

Getting Started

This package is constructed to allow users to translate names from a source language to a target language with two possible connections (Rosette ,Google Translate)., (*2)

After downloading the package, you need to set your API KEYs for the previously mentioned connections in the configuration file (config/name-translation.php)., (*3)

Also, you need to assign them in the test file (tests/NameTranslation/TranslatioTest) if you want to run the used tests in the package., (*4)

By default,the translation will be held with the Rosette Connection from English to Arabic., (*5)

You can use the main method translate($name, $source, $target), which take three parameters as $name => The given name that you want to translate (must be given) $source => The source language (optional _default = arabic); $target => The source language (optional _default = english)., (*6)

Prerequisites

The requirements for this package are:, (*7)

    php: ">=5.6.4",
    illuminate/support: "~5.0"

Also for the tests,you need to have the following in the require-dev:, (*8)

    "phpunit/phpunit": "5.0.*"

Also, the test configuration includes the code coverage which can be enabled if you have Xdebug in your system. Xdebug can be installed via brew install:, (*9)

brew install < php-version >-xdebug, (*10)

eg., (*11)

brew install php56-xdebug, (*12)

Installing

Install the package via composer:, (*13)

     composer require yamsafer/name-translation

Register the ServiceProvider in config/app.php, (*14)

    'providers' => [
    // [...]
            NameTranslation\TranslationServiceProvider::class,
    ],

You may also register the NameTranslation Facade:, (*15)

    'aliases' => [
    // [...]
            'NameTranslation' => NameTranslation\Facades\NameTranslationFacade::class,
    ],

Within your laravel project, when you execute Laravel's vendor:publish command, the configuration will be published., (*16)

Run Tests

You can run the tests using the following command under the previously mentioned specifications:, (*17)

  vendor/bin/phpunit tests/NameTranslation/TranslationTest.php

Within your project you must assign the right directory as:, (*18)

  vendor/bin/phpunit yamsafer/name-translation/tests/NameTranslation/TranslationTest.php

The Versions

22/08 2017

dev-master

9999999-dev

package to translate names with one of the two ways 1.Rosette 2.Google Translate

  Sources   Download

The Requires

 

The Development Requires

22/08 2017

v1.0.2

1.0.2.0

package to translate names with one of the two ways 1.Rosette 2.Google Translate

  Sources   Download

The Requires

 

The Development Requires

21/08 2017

dev-fix-travis

dev-fix-travis

package to translate names with one of the two ways 1.Rosette 2.Google Translate

  Sources   Download

The Requires

 

The Development Requires

21/08 2017

v1.0.1

1.0.1.0

package to translate names with one of the two ways 1.Rosette 2.Google Translate

  Sources   Download

The Requires

 

The Development Requires

21/08 2017

v1.0.0

1.0.0.0

package to translate names with one of the two ways 1.Rosette 2.Google Translate

  Sources   Download

The Requires

 

The Development Requires