Transposh - Breaking valodu barjeras

Transposh.org WordPress spraudnis vitrīna un atbalsta vietni

  • Mājas
  • Sazināties ar mums
  • Lejupielādēt
  • Jautājumi un atbildes
    • Ziedot
  • Konsultācija
    • Logrīku vitrīna
  • Par

Versija 1.0.9.5 – Cīņa ar koda puvi

Martā 15, 2025 autors Ofer 10 Komentāri

Pēc 16 darbības gadi un vairāk nekā divi gadi bez jauna izlaišanas, Mūsu spraudnis saskārās ar plašu izaicinājumu, kas pazīstams kā koda puve. Šī problēma rodas, kad funkcionalitāte laika gaitā pasliktinās - pat bez izmaiņām spraudņa kodā - uz ārējiem faktoriem. Jauni WordPress izlaidumi, Atjauninātas PHP versijas, un tulkošanas pakalpojumu maiņa var izjaukt rūpīgi izstrādātas funkcijas.

Versijā 1.0.9.5, Mēs esam risinājuši šos izaicinājumus, ar galveno koncentrēšanos uz tulkošanas motoriem. Mēs noņēmām novecojušu kodu un ieviesām jaunas ieviešanas, lai atjaunotu atbalstu Yandex un Baidu tulkošanas pakalpojumiem, kas pēdējos gados bija pārstājuši darboties. Šie atjauninājumi nodrošina, ka tulkošanas funkcijas atkal darbojas pilnībā. Papildus, Mēs esam paplašinājuši valodas atbalstu, iekļaujot jaunas valodas, kas laika gaitā pievienotas šīm tulkošanas pakalpojumiem.

Šis izlaidums atspoguļo mūsu centību saglabāt spraudni uzticamu un efektīvu, Pielāgošanās mainīgajai tehnoloģiju un pakalpojumu ainavai.

Mēs esam ieviesuši jaunu logrīku, kas izmanto standarta karoga emocijzīmes, kas ir iestrādāti gadu gaitā iestatītajās emocijzīmēs. Šis atjauninājums ievērojami vienkāršo logrīka kodu, vienlaikus ļaujot viegli pielāgot karodziņus, lai apmierinātu jūsu īpašās vajadzības.

Jūs varat pārbaudīt šo jauno logrīku darbībā mūsu vietnē, kur mēs esam pievienojuši gudru CSS triku, kas padara pašreizējo valodas ikonu divreiz lielāku nekā pārējās, sasniegts tikai ar šādām divām koda rindām!
.transposh_flags{font-size:22px}
.tr_active{font-size:44px; float:left}

Mēs ceram, ka jums patiks šī jaunā versija!

Iesniegts Saskaņā: Vispārīgas ziņas, Release sludinājumi, Programmatūras atjauninājumi Atzīmēti ar: emocijzīmes, atbrīvot, widget, WordPress spraudnis

Komentāri

  1. Matze Karajanov saka

    Martā 16, 2025 pie 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!

    Atbildēt
  2. Matze Karajanov saka

    Martā 16, 2025 pie 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.

    Atbildēt
  3. Bobs saka

    Martā 18, 2025 pie 3:51 am

    When I save post, It shows this error:
    Brīdinājuma: 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

    ja ($langrec[‘engines’][$dzinēja]) {

    uz

    ja (isset($langrec[‘engines’][$dzinēja])) {

    Atbildēt
    • Ofer saka

      Martā 18, 2025 pie 11:11 am

      Paldies, ka ziņojāt par šo, fixed in https://github.com/oferwald/transposh/commit/70f1a6bafc72a0358b42ada8a576a9f02b5ed136

      Atbildēt
  4. Lulu Čengs saka

    Martā 28, 2025 pie 4:17 am

    Sveiki, 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? Paldies

    Atbildēt
    • Ofer saka

      Martā 30, 2025 pie 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.

      Atbildēt
      • Lulu Čengs saka

        Martā 30, 2025 pie 5:41 pm

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

        Atbildēt
  5. būda saka

    Aprīlī 5, 2025 pie 10:11 am

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

    Atbildēt
  6. Steisija saka

    Aprīlī 8, 2025 pie 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

    Atbildēt
  7. fhzy saka

    Aprīlī 24, 2025 pie 4:52 am

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

    Atbildēt

Leave a Reply to Bobs Atcelt atbildi

Jūsu e-pasta adrese netiks publicēta. Obligātie lauki ir atzīmēti *

Tulkojums

🇺🇸🇸🇦🇧🇩🏴󠁥󠁳󠁣󠁴󠁿🇨🇳🇹🇼🇭🇷🇨🇿🇩🇰🇳🇱🇪🇪🇵🇭🇫🇮🇫🇷🇩🇪🇬🇷🇮🇳🇮🇱🇮🇳🇭🇺🇮🇩🇮🇹🇯🇵🇮🇳🇰🇷🇱🇻🇱🇹🇲🇾🇮🇳🇮🇳🇳🇴🇵🇱🇵🇹🇵🇰🇷🇴🇷🇺🇷🇸🇸🇰🇸🇮🇪🇸🇸🇪🇮🇳🇮🇳🇹🇭🇹🇷🇺🇦🇵🇰🇻🇳
Uzstādīt kā noklusēto valodu
 Rediģēt Tulkojumu

Sponsori

Mēs gribētu pateikties mūsu sponsoriem!

Pastmarku kolekcionāriem, monētas, banknotes, TCGs, video spēles un daudz baudīt Transposh tulkots Colnect'ā in 62 valodas. Apmainīt, maiņa, kašķis savu personīgo kolekciju izmantojot mūsu katalogu. Ko jūs savākt?
Savienojošie kolektori: monētas, zīmogi un vairāk!

Jaunākie komentāri

  1. fhzy ieslēgts Versija 1.0.9.5 – Cīņa ar koda puviAprīlī 24, 2025
  2. Steisija ieslēgts Versija 1.0.9.5 – Cīņa ar koda puviAprīlī 8, 2025
  3. būda ieslēgts Versija 1.0.9.5 – Cīņa ar koda puviAprīlī 5, 2025
  4. Lulu Čengs ieslēgts Versija 1.0.9.5 – Cīņa ar koda puviMartā 30, 2025
  5. Ofer ieslēgts Versija 1.0.9.5 – Cīņa ar koda puviMartā 30, 2025

Tags

0.7 0.9 Ajax bing (msn) tulkotājs dzimšanas diena buddypress Kļūdu labojums kontroles centrs css sprites atkļūdošanas ziedoto tulkojums ziedojumi emocijzīmes fake intervijas karogi Karoga sprites pilna versija getText Google XML portālkartes Google Translate galvenais nepilngadīgais vairākas valodas parsētājs profesionāls tulkošanas atbrīvot rss securityfix THIS Īsais īskodus ātruma uzlabojumus sākums themeroller trac ui video widget wordpress.org WordPress 2.8 WordPress 3.0 WordPress MU WordPress spraudnis wp-super-cache XCache

Attīstības plūsma

  • Atbrīvošana 1.0.9.6
    Aprīlī 5, 2025
  • Nelieli koda uzlabojumi, lai rediģētu interfeisu un noņemtu kādu nolietojumu ...
    Martā 22, 2025
  • Labojiet nenoteiktu masīva atslēgu
    Martā 18, 2025
  • Beidzot atbalstiet jqueryui 1.14.1, Labi saīsiniet kodu
    Martā 17, 2025
  • Atbrīvošana 1.0.9.5
    Martā 15, 2025

Sociālā

  • Facebook
  • Twitter

Design by LPK Studio

Ieraksti (RSS) un Komentāri (RSS)

Autortiesības © 2025 · Transposh LPK Studio ieslēgts Genesis Framework · WordPress · Pieslēgties