2017 © Pedro Peláez
 

library tml

Translation Markup Language for PHP

image

translationexchange/tml

Translation Markup Language for PHP

  • Thursday, February 1, 2018
  • by Berk
  • Repository
  • 8 Watchers
  • 0 Stars
  • 5,977 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 33 Versions
  • 6 % Grown

The README.md

, (*1)

Tml for PHP

Latest Stable Version Build Status Coverage Status Latest Unstable Version Dependency Status Total Downloads Monthly Downloads License Open Source Helpers, (*2)

Installation

Tml for PHP can be installed using the composer dependency manager. If you don't already have composer installed on your system, you can get it using the following command:, (*3)

$ cd YOUR_APPLICATION_FOLDER
$ curl -s http://getcomposer.org/installer | php

Create composer.json in the root folder of your application, and add the following content:, (*4)

{
    "require": {
        "translationexchange/tml": "3.2.18"
    }
}

This tells composer that your application requires tml library to be installed., (*5)

Now install Tml library by executing the following command:, (*6)

$ composer install

Composer will automatically create a vendor folder and put the SDK into vendor/translationexchange/tml directory., (*7)

Now you are ready to integrate TML into your application., (*8)

Integration

Before you can proceed with the integration, please visit http://translationexchange.com to register your application., (*9)

Once you have created a new application, you will be given an application key and a secret. You will need to enter them in the initialization function of the TML SDK., (*10)

To make sure you have installed everything correctly, create a sample test file in the root folder of your app and call it index.php, (*11)

Paste the following content into the file:, (*12)


 YOUR_APPLICATION_TOKEN
)); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo tml_current_locale(); ?>">
<head>
    <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
    <?php tml_scripts(); ?>
</head>
<body>
    <?php tre("Hello World") ?>
</body>
</html>

Make sure you replace YOUR_APPLICATION_KEY with the key and YOUR_APPLICATION_TOKEN with the token you copied from translationexchange.com, (*13)

You can start the default PHP web server from your application folder using the following command:, (*14)

$ php -S localhost:8080

Now you can open up your browser and navigate to the file:, (*15)

http://localhost:8080/index.php, (*16)

If everything was configured correctly, you should see a phrase "Hello World" on your page., (*17)

You should see a lightbox with TML's default shortcuts. To close the lightbox, click on the top-right corner or simply press the Esc button., (*18)

Press Ctrl+Shift+L to switch to a different language., (*19)

Now you can press Ctrl+Shift+I to enable inline translations., (*20)

When inline translations are enabled you will see translated phrases underlined in green color and not translated phrases with red., (*21)

Right-Mouse-Click (or Ctrl+Click on Mac) on any phrase and you will see an inline translator window that will allow you to translate the phrase., (*22)

To learn about various integration options and TML features, visit our online interactive documentation:, (*23)

Links

  • Register at TranslationExchange.com: https://translationexchange.com, (*24)

  • Follow TranslationExchange on Twitter: https://twitter.com/translationx, (*25)

  • Connect with TranslationExchange on Facebook: https://www.facebook.com/translationexchange, (*26)

  • If you have any questions or suggestions, contact us: support@translationexchange.com, (*27)

Copyright and license

Copyright (c) 2017 Translation Exchange, Inc., (*28)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:, (*29)

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software., (*30)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE., (*31)

The Versions

01/02 2018

dev-master

9999999-dev https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

25/10 2017

dev-develop

dev-develop https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

25/10 2017

3.2.18

3.2.18.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

31/01 2017

3.2.17

3.2.17.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

31/01 2017

3.2.16

3.2.16.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

24/11 2016

3.2.15

3.2.15.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

24/11 2016

3.2.14

3.2.14.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

16/08 2016

3.2.13

3.2.13.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

09/07 2016

3.2.12

3.2.12.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

15/06 2016

3.2.11

3.2.11.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

05/06 2016

3.2.10

3.2.10.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

05/06 2016

3.2.9

3.2.9.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

05/06 2016

3.2.8

3.2.8.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

13/05 2016

3.2.7

3.2.7.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

13/05 2016

3.2.6

3.2.6.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

06/05 2016

3.2.5

3.2.5.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

31/03 2016

3.2.4

3.2.4.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

25/03 2016

3.2.3

3.2.3.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

24/03 2016

3.2.2

3.2.2.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

24/03 2016

3.2.1

3.2.1.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

03/02 2016

3.1.2

3.1.2.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

13/01 2016

3.1.1

3.1.1.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

10/12 2015

3.0.8

3.0.8.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

10/12 2015

3.0.7

3.0.7.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

10/12 2015

3.0.5

3.0.5.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

10/12 2015

3.0.4

3.0.4.0 https://translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

22/09 2015

3.0.3

3.0.3.0 http://welcome.translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

19/09 2015

3.0.2

3.0.2.0 http://welcome.translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

17/09 2015

3.0.1

3.0.1.0 http://welcome.translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

18/06 2015

2.0.1

2.0.1.0 http://welcome.translationexchange.com

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

08/02 2015

1.4.2

1.4.2.0 https://github.com/translationexchange/tml-php

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

30/01 2015

1.4.1

1.4.1.0 https://github.com/translationexchange/tml-php

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language

29/01 2015

1.4.0

1.4.0.0 https://github.com/translationexchange/tml-php

Translation Markup Language for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

translation i18n internationalization localization l10n tml tr8n t9n translation markup language