languages.phtml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * @version 7.2
  4. */
  5. ?>
  6. <form action="<?php echo $this->url(null, null, true, array('title', 'save_language', 'language')); ?>" method="post">
  7. <nav class="navbar navbar-filter">
  8. <!-- TODO: (optional) add option to create a language file directly from this page -->
  9. <div class="navbar-form navbar-right">
  10. <div class="form-group">
  11. <label class="control-label">
  12. <?php echo $this->_('Select Language'); ?>
  13. </label>
  14. <?php echo $this->formElement('select', 'language', $this->language)
  15. ->setMultiOptions(\Ppb\Utility::getLanguages())
  16. ->setAttributes(array(
  17. 'class' => 'form-control input-default'))
  18. ->render();
  19. ?>
  20. </div>
  21. <?php echo $this->formElement('submit', 'submit', $this->_('Proceed'))
  22. ->setAttributes(array('class' => 'btn btn-default'))
  23. ->render();
  24. ?>
  25. </div>
  26. </nav>
  27. <p>
  28. <?php echo $this->_("Important: the majority of the sentences are found in the .mo files, that can be translated only using a gettext parser, like poedit. <br>"
  29. . "For more information, please check our <a href='http://www.phpprobid.com/translation-tutorial' target='_blank'>translation tutorial</a>."); ?>
  30. </p>
  31. <?php if ($this->language) { ?>
  32. <div class="form-group">
  33. <?php echo $this->formElement('\Ppb\Form\Element\LinkedTextarea', 'langData')
  34. ->setAttributes(array(
  35. 'rows' => '32',
  36. ))
  37. ->setValue($this->data)
  38. ->render(); ?>
  39. <span class="help-block">
  40. <?php echo $this->_('Recommended: you should edit this file using a dedicated editor, preferably one that recognizes php syntax. <br>'
  41. . 'Important: the quote (&quot;) character is reserved, please escape it (\&quot;) if needing to use it. <br>'
  42. . 'Important: adding invalid code to this file might render your site unusable.'); ?>
  43. </span>
  44. </div>
  45. <div class="form-group">
  46. <?php echo $this->formElement('submit', 'save_language', $this->_('Save'))
  47. ->setAttributes(array('class' => 'btn btn-primary'))
  48. ->render();
  49. ?>
  50. </div>
  51. <?php } ?>
  52. </form>