Transposh - Spargerea barierelor lingvistice

Transposh.org wordpress plugin showcase şi sprijin site-ul

  • Acasă
  • Contactati-ne
  • Descărcaţi
  • FAQ
    • Doneaza
  • Tutorial
    • Showcase Widget
  • Despre

Versiunea 1.0.9.5 – Lupta cu putregaiul codului

Martie 15, 2025 de Ofer 10 Comentarii

După 16 ani de funcționare și mai mult de doi ani fără o nouă versiune, Pluginul nostru a întâmpinat o provocare pe scară largă, cunoscută sub numele de Cod Rot. Această problemă apare atunci când funcționalitatea se degradează în timp - chiar și fără modificări ale codului pluginului - datorită factorilor externi. Noile lansări WordPress, Versiuni PHP actualizate, Și schimbările serviciilor de traducere pot perturba funcțiile proiectate cu atenție.

În versiune 1.0.9.5, Am abordat aceste provocări, cu un accent principal pe motoarele de traducere. Am eliminat codul învechit și am introdus noi implementări pentru a restabili asistența pentru serviciile de traducere Yandex și Baidu, care încetase să lucreze în ultimii ani. Aceste actualizări se asigură că caracteristicile de traducere sunt din nou funcționale din nou. În plus,, Am extins sprijinul limbajului pentru a include noi limbi adăugate la aceste servicii de traducere în timp.

Această versiune reflectă dedicația noastră de a menține pluginul fiabil și eficient, Adaptarea la peisajul în evoluție al tehnologiilor și serviciilor.

Am introdus un nou widget care utilizează emoji standard de pavilion, care au fost încorporate în emoji de -a lungul anilor. Această actualizare simplifică în mod semnificativ codul widget -ului, În timp ce permiteți personalizarea ușoară a steagurilor pentru a răspunde nevoilor dvs. specifice.

Puteți consulta acest nou widget în acțiune pe site -ul nostru, În cazul în care am adăugat un truc CSS inteligent care face ca pictograma limbii actuale de două ori mai mari decât celelalte, obținut doar cu următoarele două linii de cod!
.transposh_flags{font-size:22px}
.tr_active{font-size:44px; float:left}

Sperăm să vă bucurați de această nouă versiune!

Filed under: Mesaje generale, Anunţuri de lansare, Software-ul Actualizări Etichetate cu: emoji, eliberare, widget, WordPress plug-in

Comentarii

  1. Matze Karajanov spune

    Martie 16, 2025 la 3:52 a.m

    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!

    Răspuns
  2. Matze Karajanov spune

    Martie 16, 2025 la 3:57 a.m

    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.

    Răspuns
  3. Bob spune

    Martie 18, 2025 la 3:51 a.m

    When I save post, It shows this error:
    Avertisment: 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

    dacă ($langrec[‘engines’][$motor]) {

    la

    dacă (plecat($langrec[‘engines’][$motor])) {

    Răspuns
    • Ofer spune

      Martie 18, 2025 la 11:11 a.m

      Vă mulţumim pentru raportarea acestui, imobilizate în https://github.com/oferwald/transposh/commit/70f1a6bafc72a0358b42ada8a576a9f02b5ed136

      Răspuns
  4. Lulu Cheng spune

    Martie 28, 2025 la 4:17 a.m

    Buna ziua, 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? Mulțumiri

    Răspuns
    • Ofer spune

      Martie 30, 2025 la 2:05 p.m

      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.

      Răspuns
      • Lulu Cheng spune

        Martie 30, 2025 la 5:41 p.m

        Îmi pare rău, I entered a wrong information, it is Rank math.

        Răspuns
  5. Wu spune

    Aprilie 5, 2025 la 10:11 a.m

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

    Răspuns
  6. Stacy spune

    Aprilie 8, 2025 la 2:52 p.m

    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

    Răspuns
  7. fhzy spune

    Aprilie 24, 2025 la 4:52 a.m

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

    Răspuns

Leave a Reply to Matze Karajanov Anulează răspuns

Adresa ta de email nu va fi publicată. Câmpurile necesare sunt marcate *

Traducere

🇺🇸🇸🇦🇧🇩🏴󠁥󠁳󠁣󠁴󠁿🇨🇳🇹🇼🇭🇷🇨🇿🇩🇰🇳🇱🇪🇪🇵🇭🇫🇮🇫🇷🇩🇪🇬🇷🇮🇳🇮🇱🇮🇳🇭🇺🇮🇩🇮🇹🇯🇵🇮🇳🇰🇷🇱🇻🇱🇹🇲🇾🇮🇳🇮🇳🇳🇴🇵🇱🇵🇹🇵🇰🇷🇴🇷🇺🇷🇸🇸🇰🇸🇮🇪🇸🇸🇪🇮🇳🇮🇳🇹🇭🇹🇷🇺🇦🇵🇰🇻🇳
Setaţi ca limba implicită
 Editați traducerea

Sponsori

Am dori să mulţumim sponsorilor noştri!

Colecționari de timbre, monede, bancnote, TCGs, jocuri video și multe altele se bucură de Transposh-traduse în Colnect 62 limbi. schimb, schimb valutar, mange colecția personală folosind catalogul nostru. Ce colectezi?
Conectarea colectoarelor: monede, timbre și mai mult!

Comentarii recente

  1. fhzy pe Versiunea 1.0.9.5 – Lupta cu putregaiul coduluiAprilie 24, 2025
  2. Stacy pe Versiunea 1.0.9.5 – Lupta cu putregaiul coduluiAprilie 8, 2025
  3. Wu pe Versiunea 1.0.9.5 – Lupta cu putregaiul coduluiAprilie 5, 2025
  4. Lulu Cheng pe Versiunea 1.0.9.5 – Lupta cu putregaiul coduluiMartie 30, 2025
  5. Ofer pe Versiunea 1.0.9.5 – Lupta cu putregaiul coduluiMartie 30, 2025

Tag-uri

0.7 0.9 Ajax bing (msn) traducător zi de naştere buddypress Bugfix centrul de control CSS sprites depana donate de traducere donaţii emoji Interviuri fals steaguri pavilion sprite versiunea completă Gettext google-xml-sitemap-uri Google Translate major minor mai multe limbi parser profesională traducere eliberare rss securityfix ACEST scurtătură scurte Viteza de accesorii start themeroller Trac ui video widget wordpress.org wordpress 2.8 wordpress 3.0 WordPress MU WordPress plug-in wp-super-cache xcache

Flux de dezvoltare

  • Eliberare 1.0.9.6
    Aprilie 5, 2025
  • Îmbunătățiri ale codului minor pentru a edita interfața și a elimina o oarecare deprecare ...
    Martie 22, 2025
  • Remediați cheia de matrice nedefinită
    Martie 18, 2025
  • În cele din urmă, susțineți JQueryui 1.14.1, scurtați codul frumos
    Martie 17, 2025
  • Eliberare 1.0.9.5
    Martie 15, 2025

Social

  • Facebook
  • Stare de nervozitate

Design de LPK Studio

Intrări (RSS) și Comentarii (RSS)

Drepturi de autor © 2025 · Transposh LPK Studio pe Cadrul Genezei · WordPress · Autentificare