Skip to content

TNAJanssen/JMSTranslationBundle2

 
 

Repository files navigation

JMSTranslationBundle fork

Differences:

  • Command performance upgrade: scan files only ones and not per languages!
  • Sort source
  • Collect the placeholders (<jms:placeholder> element)
  • Move meaning to jms:meaning attribute
  • Custom translated form fields
  • Add new configurations: output_options -> add_date and add_filerefs
  • Handle addViolation(), addViolationAt() and buildViolation() functions
  • Add new Annotation: AltTrans . You can add basic translations:
<?php

/** @AltTrans("User has been created: <a href=""mailto:%email%"">%email%</a>", locale="en") */
$this->trans('user.create.success.%email%', ['%email%' => $user->getEmail()]);

The double "" sign is the escaped " in the AltTrans annotation value.

  • Add new Trans* Annotations: TransArrayKeys, TransArrayValues, TransString . You can handle the strings in var:
<?php

/** @TransArrayValues("error") */
$msgs = [
    /** @AltTrans("Error 1", locale="en") */
    'error.msg1',
    /** @AltTrans("Error 2", locale="en") */
    'error.msg2',
    /** @AltTrans("Error 3", locale="en") */
    'error.msg3',
];
/** @Ignore */
$this->trans($msgs[$errorId], [], "error");

JMSTranslationBundle Build Status Join the chat at https://gitter.im/schmittjoh/JMSTranslationBundle

Documentation: Resources/doc

Code License: Resources/meta/LICENSE

Documentation License: Resources/doc/LICENSE

About

The new JMSTranslationBundle

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 93.7%
  • JavaScript 3.9%
  • HTML 2.3%
  • CSS 0.1%