Code Monkey home page Code Monkey logo

cakephp-lokalise's Introduction

CakePHP Plugin for Lokalise.co

Lokalise is a service that helps you translated your application strings and keep a track of how those translations change. The idea of this plugin is that you can upload the translation strings to this services, then after translating them, download the translations and put them in the right directories for each locale.

Installation

First add the plugin to composer

composer require lorenzo/lokalise

Then activate the plugin

bin/cake plugin load Lokalise

Finally add your project id and lokalise API token to app.php

// config/app.php
...

'Lokalise' => [
    'project' => 'your project id',
    'api_token' => 'the api token as provided by lokalise'
]

Usage

You first need to run the i18n extract that is provided by CakePHP. This task will find all call for the __() of functions and generate at least one .pot file in the src/Locale folder

bin/cake i18n extract

Once this process is done, you can push your translations to lokalise. You need to be explicit about the locales you want to create/update in lokalise:

bin/cake lokalise push --locales en_US,fr_FR,pt_BR

You can now go to your lokalise dashboard and translated all the strings. In order to see the tranlated strings in your applicaiton, you need to download them back:

bin/cake lokalise pull

cakephp-lokalise's People

Contributors

lorenzo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cakephp-lokalise's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.