Code Monkey home page Code Monkey logo

mb_translate's Introduction

MB_Translate

Magento Connect: http://www.magentocommerce.com/magento-connect/cms-translate.html

English:

Translate CMS Pages in Magento.

Use: In any CMS Page or Block use {{translate text="Text here"}} and the text will be translatable with the Inline translator.

Source: http://www.magentocommerce.com/boards/viewthread/179598/#

If you want this to be a part of Magento2, add a +1 here.

--

Spanish:

Traducir paginas CMS en Magento

Uso: En cualquier pagina CMS o Bloque usar {{translate text="Texto aqui"}} y el texto sera traducible con el traductor Inline.

Fuente: http://www.magentocommerce.com/boards/viewthread/179598/#

Si crees que esto deberia ser parte e Magento2 suma un +1 aqui.

mb_translate's People

Contributors

miguelbalparda avatar ottonet avatar strajeru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mb_translate's Issues

The filter model should extend Mage_Widget_Model_Template_Filter

The filter model used by the CMS pages is Mage_Widget_Model_Template_Filter. (see app/code/core/Mage/Widget/etc/config.xml)

 <cms>
     <page>
           <tempate_filter>widget/template_filter</tempate_filter>
       </page>
       <block>
           <tempate_filter>widget/template_filter</tempate_filter>
       </block>
 </cms>

If you don't extend that class you can lose the {{widget ...}} directive

Pass a module name to the translate directive

In the way is built now all the texts are translated using the page module.
You should be able to pass a module name to the translate directive:

{{translate text="some text here" module="catalog"}}

This can be achieved by doing this:

public function translateDirective($construction)
{
    $params = $this->_getIncludeParameters($construction[2]);
    $text = $params['text'];
    $module = (!empty($params['module'])) ? $params['module'] : 'page';
    return Mage::helper($module)->__($text);
}

Traducir url y breadcrumb

En primer lugar, enhorabuena por la extensión. Gran trabajo, una funcionalidad así me parece indispensable.

Utilizándola he encontrado dos cuestiones, que quería consultarte si serían sencillas de aplicar:

  1. Habría algún modo de usar esta técnica de traducción tb para las URLs? De otro modo aunq con esto podamos traducir los textos del contenido, la url debería ser la misma para todos los idiomas, no?

  2. Veo que en el título del contenido del CMS se puede usar el código de traducción. Al visualizar la página sale todo bien, a excepción de las migas de pan, donde veo que sale todo el chorreo:
    Inicio > {{translate text="pagina cms cualquiera"}}

Gracias de antemano y enhorabuena por el trabajo.

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.