Recommend this page to a friend! |
Download .zip |
Info | View files (30) | Download .zip | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 80 | All time: 9,917 This week: 339 |
Version | License | PHP version | Categories | |||
translations 1.0 | MIT/X Consortium ... | 5.3 | Localization, PHP 5, Web services |
Description | Author | |||
This package can get language translations for Symfony projects text from tradukoj.com site. Innovation Award
|
This bundle permits API comunication with https://translations.com.es
In order to install this bundle you need to pay attention with requiremens:
php > 5.3
php-lzf extension must be installed (try sudo pecl install lzf)
Checkout a copy of the code:
// in composer.json
"require": {
// ...
"jlaso/translations-apibundle": "*"
// ...
},
Then register the bundle with your kernel:
// in AppKernel::registerBundles()
$bundles = array(
// ...
new JLaso\TranslationsApiBundle\TranslationsApiBundle(),
// Excel Bundle
new Liuggio\ExcelBundle\LiuggioExcelBundle(),
// ...
);
// in app/config/parameters.yml
###############################
## TRANSLATIONS API REST ##
###############################
jlaso_translations_api_access:
project_id: 1 # the number that correspond to the project created
key: 1234 # the key that systems assigns
secret: 1234 # the password that you choose when init project in server
url: http://translations.com.es/app.php/api/
// in app/config/config.yml
translations_api:
default_locale: %locale%
managed_locales: ['es', 'en', 'fr', 'ca'] # the languages you want
and remember to enable translator in framework key
framework:
translator: { fallback: %locale% }
first schema:update to init database with SCM table:
app/console doctrine:schema:update --force --env=dev
now, fill the local database with the content of your translations/catalog.locale.yml files
app/console jlaso:translations:dump
and next upload your messages form local database to remote server
app/console jlaso:translations:sync --upload-first=yes
when you use the bundle first time is necessary the use the upload-first option in order to generate the remote db
For synchronize local translations with server (remote) translations:
app/console jlaso:translations:sync [--cache-clear] [--backup-files]
In the view
Currently only be used yaml files in src/Company/bbbBundle/Resource/translations/messages.xx.yml
with xx as locale, and bbb as bundle name,
same for translations resources of app located at app/Resources/messages.xx.yml
Files |
File | Role | Description | ||
---|---|---|---|---|
Command (9 files) | ||||
Component (1 directory) | ||||
DependencyInjection (2 files) | ||||
Entity (1 file, 1 directory) | ||||
Features (1 file, 1 directory) | ||||
Model (1 file) | ||||
Resources (2 directories) | ||||
Service (2 files) | ||||
Tools (1 file) | ||||
Translation (1 directory) | ||||
ChangeLog | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
LICENSE.md | Lic. | Auxiliary data | ||
README.md | Doc. | Auxiliary data | ||
ShortLog | Data | Auxiliary data | ||
TranslationsApiBundle.php | Class | Class source | ||
VERSION | Data | Auxiliary data |
Files | / | Command |
File | Role | Description |
---|---|---|
TranslationsBaseCommand.php | Class | Class source |
TranslationsDiscoverAndPushCommand.php | Class | Class source |
TranslationsDumpCommand.php | Class | Class source |
TranslationsExtractCommand.php | Class | Class source |
TranslationsHelperCommand.php | Class | Class source |
TranslationsSyncCommand.php | Class | Class source |
TranslationsSyncDocumentsCommand.php | Class | Class source |
TranslationsUpdateFromExcelCommand.php | Class | Class source |
TranslationsUploadYmlCommand.php | Class | Class source |
Files | / | Component | / | HttpKernel | / | DataCollector |
File | Role | Description |
---|---|---|
TranslationsDataCollector.php | Class | Class source |
Files | / | DependencyInjection |
File | Role | Description |
---|---|---|
Configuration.php | Class | Class source |
TranslationsApiExtension.php | Class | Class source |
Files | / | Resources | / | views | / | DataCollector |
File | Role | Description |
---|---|---|
translations.html.twig | Data | Auxiliary data |
Files | / | Service |
File | Role | Description |
---|---|---|
ClientApiService.php | Class | Class source |
ClientSocketService.php | Class | Class source |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.