Transposh - Ang paglabag ng mga hadlang sa wika

Transposh.org wordpress plugin showcase at suporta site

  • Tahanan
  • Makipag-ugnay sa amin
  • I-download ang
  • FAQ
    • Magbigay ng mga
  • Tutorial
    • Widget ng Showcase
  • Tungkol sa

Bersyon 1.0.9.5 – Paglaban sa code rot

Marso 15, 2025 pamamagitan ng Ofer 10 Komentaryo

Pagkatapos ng 16 years of operation and more than two years without a new release, our plugin encountered a widespread challenge known as code rot. This issue arises when functionality degrades over time—even without changes to the plugin’s code—due to external factors. New WordPress releases, updated PHP versions, and shifts in translation services can disrupt carefully designed features.

In version 1.0.9.5, we’ve tackled these challenges, with a primary focus on the translation engines. We removed outdated code and introduced new implementations to restore support for Yandex and Baidu translation services, which had stopped working in recent years. These updates ensure that the translation features are fully operational once again. Additionally, we’ve expanded language support to include new languages added to these translation services over time.

This release reflects our dedication to keeping the plugin reliable and effective, adapting to the evolving landscape of technologies and services.

We’ve introduced a new widget that utilizes standard flag emojis, which have been incorporated into the emoji set over the years. This update simplifies the widget’s code significantly, while also enabling easy customization of the flags to meet your specific needs.

You can check out this new widget in action on our site, where we’ve added a clever CSS trick that makes the current language icon twice as large as the others, achieved with just the following two lines of code!
.transposh_flags{font-size:22px}
.tr_active{font-size:44px; float:left}

We hope you enjoy this new version!

Isampa sa ilalim ng: Mga mensahe sa pangkalahatang, Pagpapalabas ng mga pahayag, Mga update sa software Naka-tag sa: mga emoji, pakawalan, widget, WordPress plugin

Komentaryo

  1. Matze Karajanov Sabi ni

    Marso 16, 2025 sa 3:52 AM

    How to translate your meta title and description with transposh!

    After some “vibe coding” as they say (people who don’t know how to code but still code with AI) I figured out in a creative way how to translate the meta title and description when using transposh.

    As an SEO marketing guy that was something that really bothered me. Translated sites, with English results in google.

    So how did I do it.

    First I added this php snippet (created by Grok 3)
    That translated the meta title for me.

    I called it Meta Title and Description in WP Snippet:

    add_filter('rank_math/frontend/title', function($title) {
    global $my_transposh_plugin;

    // Controleer of Transposh actief is
    if (!isset($my_transposh_plugin) || !is_object($my_transposh_plugin)) {
    return $title;
    }

    // Haal de huidige taal op
    $lang = transposh_get_current_language();

    // Vertaal alleen als de taal niet de standaardtaal is
    if ($lang && !$my_transposh_plugin->options->is_default_language($lang)) {
    // Gebruik fetch_translation om de title te vertalen
    list(, $translated_title) = $my_transposh_plugin->database->fetch_translation($title, $lang);
    if ($translated_title) {
    $title = $translated_title;
    }
    }

    return $title;
    });

    add_filter('rank_math/frontend/description', function($description) {
    global $my_transposh_plugin;

    // Controleer of Transposh actief is
    if (!isset($my_transposh_plugin) || !is_object($my_transposh_plugin)) {
    return $description;
    }

    // Haal de huidige taal op
    $lang = transposh_get_current_language();

    // Vertaal alleen als de taal niet de standaardtaal is
    if ($lang && !$my_transposh_plugin->options->is_default_language($lang)) {
    // Gebruik fetch_translation om de description te vertalen
    list(, $translated_description) = $my_transposh_plugin->database->fetch_translation($description, $lang);
    if ($translated_description) {
    $description = $translated_description;
    }
    }

    return $description;
    });

    – After this snippet > The Title was translated, but not the description. After further vibing and reaching a dead-end with Grok i figured that basically the transposh plugin was fetching the translation from the database multiple times.

    So i told Grok, hey if we add the meta title and description in the footer (hidden) as text.
    And Transposh translates it, if we than pull the description from the database that transposh manages for us wouldn’t it be translated?

    And Grok3 confirmed and gave me this snippet (after giving me a compliment for thinking outside the box)

    // Voeg de meta title en description toe aan de footer, alleen als de description is ingevuld
    add_action('wp_footer', function() {
    global $post;
    if (is_singular() && $post) {
    $meta_title = get_post_meta($post->ID, 'rank_math_title', true);
    $meta_description = get_post_meta($post->ID, 'rank_math_description', true);

    // Controleer of de meta description is ingevuld
    if (!empty($meta_description)) {
    // Standaard meta title als deze leeg is
    if (empty($meta_title)) {
    $meta_title = get_the_title($post->ID);
    }
    ?>

    document.addEventListener('DOMContentLoaded', function() {
    var metaElement = document.getElementById('transposh-meta');
    if (metaElement) {
    var translatedText = metaElement.innerText || metaElement.textContent;
    // Splits de tekst weer op in title en description (na vertaling)
    var parts = translatedText.split(' | ');
    var translatedDesc = parts[1] || translatedText; // Gebruik description na de |, anders hele tekst

    var metaTag = document.querySelector('meta[name="description"]');
    if (metaTag) {
    metaTag.setAttribute('content', translatedDesc);
    } else {
    var newMeta = document.createElement('meta');
    newMeta.name = 'description';
    newMeta.content = translatedDesc;
    document.head.appendChild(newMeta);
    }
    }
    });

    <?php
    }
    }
    });

    Just note, that I was using Rankmath as my SEO plugin, This maybe will work with Yoast? Or Other plugins, but I am sure if you feed this entire comment to an AI tool of your choice it could fix the correct fields for Yoast and others.

    Happy Translating guys and thank you for picking up the support of this plugin after so many years 🙂
    One of my top 3 secret weapons for sure!

    Reply
  2. Matze Karajanov Sabi ni

    Marso 16, 2025 sa 3:57 AM

    Sorry I forgot to mention something.

    // Voeg de meta title en description toe aan de footer, alleen als de description is ingevuld

    If you’d translate this to english it says Add the meta title and description to the footer only if the description is filled in.

    The reason why only if it’s filled in is the same reason why I figured this footer trick would work.

    If I had a unique meta description for my pages, that was not on the website. It was not translated.

    But when I didn’t add a translation at all, and kept it empty, it will pull the top words of the page. So when I only added the first snippet above, it was only translating the title, because the title is also written on the page. but the meta description was unique and nowhere seen on the website.

    That’s basically how I figured out if we add an invisible meta description in the footer > we can translate meta titles and descriptions with that first snippet above.

    So you need both snippets for it to work.
    Or only the first if you never fill in your descriptions anyways. don’t bother.

    Reply
  3. Si Bob Sabi ni

    Marso 18, 2025 sa 3:51 AM

    When I save post, It shows this error:
    Warning: Undefined array key “b” in \wp-content\plugins\transposh-translation-filter-for-wordpress\core\constants.php on line 1702

    I solved it by changing this code on line 1702

    if ($langrec[‘engines’][$engine]) {

    upang

    if (isset($langrec[‘engines’][$engine])) {

    Reply
    • Ofer Sabi ni

      Marso 18, 2025 sa 11:11 AM

      Thanks for reporting this, fixed in https://github.com/oferwald/transposh/commit/70f1a6bafc72a0358b42ada8a576a9f02b5ed136

      Reply
  4. Lulu Cheng Sabi ni

    Marso 28, 2025 sa 4:17 AM

    Hello, I use Ranmath for my website, Butthe title and description will not be translated,But the version a few years ago was OK,Can this plugin be optimized? Salamat

    Reply
    • Ofer Sabi ni

      Marso 30, 2025 sa 2:05 pm

      Had I known what Ranmath is, than maybe. I can only assume they changed something. And I can’t test things I know nothing of.

      Reply
      • Lulu Cheng Sabi ni

        Marso 30, 2025 sa 5:41 pm

        Paumanhin, I entered a wrong information, it is Rank math.

        Reply
  5. Wu Sabi ni

    Abril 5, 2025 sa 10:11 AM

    I installed the latest version, but the language bar is blank. Please take the time to update the error. Salamat sa iyo.

    Reply
  6. Si Stacy Sabi ni

    Abril 8, 2025 sa 2:52 pm

    Hello and sorry to come with a report but
    in admin in meta-box (define the language of the text) doesn’t work as he should. It show number rather than country.
    revert back to 1.0.9.4 working

    Reply
  7. fhzy Sabi ni

    Abril 24, 2025 sa 4:52 AM

    why our plugin translates “Explosion Proof” as “爆炸性证明” or “爆炸式证明” instead of “防爆”.

    Reply

Leave a Reply to Si Bob Kanselahin ang sumagot

Iyong email address ay hindi nai-publish. Kinakailangang patlang ay minarkahan *

Pagsasalin

🇺🇸🇸🇦🇧🇩🏴󠁥󠁳󠁣󠁴󠁿🇨🇳🇹🇼🇭🇷🇨🇿🇩🇰🇳🇱🇪🇪🇵🇭🇫🇮🇫🇷🇩🇪🇬🇷🇮🇳🇮🇱🇮🇳🇭🇺🇮🇩🇮🇹🇯🇵🇮🇳🇰🇷🇱🇻🇱🇹🇲🇾🇮🇳🇮🇳🇳🇴🇵🇱🇵🇹🇵🇰🇷🇴🇷🇺🇷🇸🇸🇰🇸🇮🇪🇸🇸🇪🇮🇳🇮🇳🇹🇭🇹🇷🇺🇦🇵🇰🇻🇳
Itakda bilang default na wika
 I-edit ang Translation

Sponsors

Gusto naming pasalamatan ang aming sponsors!

Collectors ng mga selyo, barya, banknotes, TCGs, video games at iba pa ay masiyahan sa Colnect Transposh isinalin sa 62 mga wika. Magpalitan ng, Exchange, mange iyong personal na koleksyon na gamit ng aming catalog. Ano ang kinokolekta mo?
Pagkonekta ng mga kolektor: barya, mga selyo at iba pa!

Mga kamakailang komento

  1. fhzy sa Bersyon 1.0.9.5 – Paglaban sa code rotAbril 24, 2025
  2. Si Stacy sa Bersyon 1.0.9.5 – Paglaban sa code rotAbril 8, 2025
  3. Wu sa Bersyon 1.0.9.5 – Paglaban sa code rotAbril 5, 2025
  4. Lulu Cheng sa Bersyon 1.0.9.5 – Paglaban sa code rotMarso 30, 2025
  5. Ofer sa Bersyon 1.0.9.5 – Paglaban sa code rotMarso 30, 2025

Tags

0.7 0.9 Ajax Bing (MSN) tagasalin kaarawan buddypress bugfix control center CSS sprites Debug binigay na pagsasalin ang mga donasyon mga emoji pekeng mga interbyu flag bandila sprites buong bersyon nasagip Google-xml-sitemaps magsalin ang Google pangunahing menor de edad mas maraming wika parser propesyonal na pagsasalin pakawalan RSS securityfix SEO shortcode mga shortcode ang mga pagpapahusay ng bilis simulan ang themeroller trac UI video widget WordPress.org WordPress 2.8 WordPress 3.0 pindutin ang MU WordPress plugin WP-super-cache xcache

Pagpapaunlad feed

  • Paglabas 1.0.9.6
    Abril 5, 2025
  • Mga menor de edad na pagpapabuti sa code upang i-edit ang interface at alisin ang ilang mga deprecation ...
    Marso 22, 2025
  • Ayusin ang hindi natukoy na array key
    Marso 18, 2025
  • Sa wakas suportahan ang jQueryUI 1.14.1, paikliin ang code nang maayos
    Marso 17, 2025
  • Paglabas 1.0.9.5
    Marso 15, 2025

Panlipunan

  • Facebook
  • Twitter

Disenyo ng LPK Studio

Mga entry (RSS) at Komentaryo (RSS)

Karapatang-ari © 2025 · Transposh LPK Studio sa Balangkas ng Genesis · WordPress · Mag-log in