Plugin Won't Translate

    • 31 posts
    February 10, 2022 9:46 AM EST

    I'm using Radcodes' Skills plugin. It generates "skills" in various places, as text on buttons. And these skills will not translate. There is no echo function involved by means of which they can be translated as text is translated.

    Vincent Van of Radcodes has shut down his plugin page and has not responded to an email I sent him (I don't blame him for not responding; and he was always a fast responder when he was working with plugins).

    Google translate doesn't seem to work on any of my pages...

    I'd REALLY like for these "skills" to be translatable, from English to Portuguese! I'll happily buy a plugin that will work for this, should anything capable exist!

    • Moderator
    • 6923 posts
    February 10, 2022 11:22 AM EST

    If they are hard coded, you could add the translations yourself. https://socialengine.atlassian.net/wiki/spaces/SU/pages/5308928/SE+PHP+-+Language+Manager but you would need to know if they are hard coded or how they are done. 

    From our Hello World plugin for learning development, you can see two examples of the code for translation. One is for the "Hello World" phrase and the other is for the "post a hello world" phrase.

    <div>
          <?php echo $this->translate("Hello world") ?>
        </div>
      </div>
      <div class="layout_right">
        <?php if( $this->viewer()->getIdentity() ): ?>
        <div class="quicklinks">
          <ul>
            <li>
              <?php echo $this->htmlLink(array('action' => 'create', 'reset' => false), $this->translate('Post a Hello World'), array('class' => 'buttonlink icon_hello_new')) ?>
            </li>
          </ul>
        </div>
        <?php endif; ?>

    This post was edited by socialenginestaff at February 10, 2022 11:22 AM EST
    • 31 posts
    February 10, 2022 11:48 AM EST

    Thank you Donna, but they're not hard coded. I use PHP translation code in various places on the site, but in this case it won't work. When looking at the code there's nothing there to translate. The terms are generated on the fly, so to speak.

    • Moderator
    • 6923 posts
    February 10, 2022 12:01 PM EST

    Maybe one of these plugins will work, I suggest to contact each of these two experts to ask if they would work for what you want:

    https://community.socialengine.com/classifieds?category=6&closed=&orderby=creation_date&search=translate&end_date=&start_date=&tag=&page=&0_0_32_field_32=&0_0_2_alias_currency%5Bmin%5D=&0_0_2_alias_currency%5Bmax%5D=&0_0_27_field_27=&0_0_18_field_18=&has_photo=

     

    EGAD! That's a super long link lol.

    • 31 posts
    February 10, 2022 12:37 PM EST

    This is the code that generates the buttons that I'd like to translate:

    <?php echo $this->partial('index/_skill_item.tpl', 'skill', array('skill'=>$skill, 'shows'=>'actions')); ?>
    
    

    If there were text in there it'd be no sweat!

     

    I'd already looked at those translation plugins but I didn't see what they'd do beyond what the language manager already does.


    This post was edited by socialenginestaff at February 10, 2022 1:00 PM EST
    • Moderator
    • 6923 posts
    February 10, 2022 1:02 PM EST

    I edited your post rather than deleting the code as it wasn't in the code tag as required here. Normally we delete.  Is there anything in that skill item tpl file that may be useful for this? I'm not an expert at the translation stuff unfortunately so it's hit or miss.

    • 31 posts
    February 10, 2022 1:10 PM EST

    Ah, okay, sorry about the code tag thing! Thank you! I'm digging into the tpl file without much hope...

    • Moderator
    • 6923 posts
    February 10, 2022 1:18 PM EST

    Ok maybe if you check the code for the menus as that allows translation. application/modules/Core/controllers/AdminMenusController.php

    // Make select options
       50:     $menuList = array();
       51:     foreach( $menus as $menu ) {
       52:       $menuList[$menu->name] = $this->view->translate($menu->title);
       53      }
    • 31 posts
    February 10, 2022 1:38 PM EST

     Thanks for that Donna. I've tried fitting "translate" in every variation into the code and nothing works.