Transposh - Prolomení jazykových bariér

Ukázka a podpora modulu Transposh pro WordPress

  • Domů
  • Napište nám
  • Stáhnout
  • Nejčastější dotazy
    • Darovat
  • Tutoriál
    • Widget Showcase
  • O nás

Verze 1.0.9.5 – Boj s hnilobou kódu

Březen 15, 2025 podle Ofer 10 Komentáře

Po 16 roky provozu a více než dva roky bez nového vydání, Náš plugin se setkal s rozšířenou výzvou známou jako hniloba kódu. Tento problém nastává, když se funkce v průběhu času zhoršuje - dokonce i bez změn kódu pluginu - na externí faktory. Nová vydání WordPress, Aktualizované verze PHP, a posuny v překladatelských službách mohou narušit pečlivě navržené funkce.

Ve verzi 1.0.9.5, Tyto výzvy jsme řešili, s primárním zaměřením na překladatelské motory. Odstranili jsme zastaralý kód a zavedli nové implementace, abychom obnovili podporu pro překladatelské služby Yandex a Baidu, který přestal pracovat v posledních letech. Tyto aktualizace zajišťují, že funkce překladu jsou opět plně funkční. Navíc, Rozšiřovali jsme podporu jazyka tak, aby zahrnovala nové jazyky přidané do těchto překladatelských služeb v průběhu času.

Toto vydání odráží naše odhodlání udržovat spolehlivé a efektivní plugin, Přizpůsobení se rozvíjející se krajině technologií a služeb.

Představili jsme nový widget, který využívá standardní emodži vlajky, které byly začleněny do emodži v průběhu let. Tato aktualizace významně zjednodušuje kód widgetu, a zároveň umožňuje snadné přizpůsobení vlajek splnit vaše konkrétní potřeby.

Tento nový widget si můžete prohlédnout v akci na našem webu, kde jsme přidali chytrý trik CSS, díky kterému je aktuální ikona jazyka dvakrát větší než ostatní, dosaženo pouze s následujícími dvěma řádky kódu!
.transposh_flags{font-size:22px}
.tr_active{font-size:44px; float:left}

Doufáme, že se vám tato nová verze bude líbit!

Soubor pod: Obecné zprávy, Vydání oznámení, Aktualizace softwaru Tagged s: emoji, uvolnění, Widget, WordPress plugin

Komentáře

  1. Matze Karajanov říká:

    Březen 16, 2025 v 3:52 dopoledne

    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!

    Odpověď
  2. Matze Karajanov říká:

    Březen 16, 2025 v 3:57 dopoledne

    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.

    Odpověď
  3. Bob říká:

    Březen 18, 2025 v 3:51 dopoledne

    When I save post, It shows this error:
    Varování: 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

    jestliže ($langrec[‘engines’][$motor]) {

    na

    jestliže (pryč($langrec[‘engines’][$motor])) {

    Odpověď
    • Ofer říká:

      Březen 18, 2025 v 11:11 dopoledne

      Díky za nahlášení tohoto, stanovené v https://github.com/oferwald/transposh/commit/70f1a6bafc72a0358b42ada8a576a9f02b5ed136

      Odpověď
  4. Lulu Cheng říká:

    Březen 28, 2025 v 4:17 dopoledne

    Ahoj, 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? dík

    Odpověď
    • Ofer říká:

      Březen 30, 2025 v 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.

      Odpověď
      • Lulu Cheng říká:

        Březen 30, 2025 v 5:41 pm

        Promiňte, I entered a wrong information, it is Rank math.

        Odpověď
  5. Wu říká:

    duben 5, 2025 v 10:11 dopoledne

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

    Odpověď
  6. Stacy říká:

    duben 8, 2025 v 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

    Odpověď
  7. fhzy říká:

    duben 24, 2025 v 4:52 dopoledne

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

    Odpověď

Leave a Reply to Matze Karajanov Zrušit odpověď

Vaše e-mailová adresa nebude zveřejněna. Povinné položky jsou označeny *

Překlad

🇺🇸🇸🇦🇧🇩🏴󠁥󠁳󠁣󠁴󠁿🇨🇳🇹🇼🇭🇷🇨🇿🇩🇰🇳🇱🇪🇪🇵🇭🇫🇮🇫🇷🇩🇪🇬🇷🇮🇳🇮🇱🇮🇳🇭🇺🇮🇩🇮🇹🇯🇵🇮🇳🇰🇷🇱🇻🇱🇹🇲🇾🇮🇳🇮🇳🇳🇴🇵🇱🇵🇹🇵🇰🇷🇴🇷🇺🇷🇸🇸🇰🇸🇮🇪🇸🇸🇪🇮🇳🇮🇳🇹🇭🇹🇷🇺🇦🇵🇰🇻🇳
Nastavit jako výchozí jazyk
 Upravit překlad

sponzoři

Chtěli bychom poděkovat našim sponzorům!

Sběratelé známek, mince, bankovky, TCG, videohry a další užijí Transposh přeloženy Colnect v 62 jazyků. Vyměňte, výměna, mange své osobní sbírku pomocí našeho katalogu. Co sbíráš?
Připojení kolektorů: mince, známky a další!

Nový příspěvek

  1. fhzy na Verze 1.0.9.5 – Boj s hnilobou kóduduben 24, 2025
  2. Stacy na Verze 1.0.9.5 – Boj s hnilobou kóduduben 8, 2025
  3. Wu na Verze 1.0.9.5 – Boj s hnilobou kóduduben 5, 2025
  4. Lulu Cheng na Verze 1.0.9.5 – Boj s hnilobou kóduBřezen 30, 2025
  5. Ofer na Verze 1.0.9.5 – Boj s hnilobou kóduBřezen 30, 2025

Tagy

0.7 0.9 Ajax bing (msn) překladatel narozeniny buddypress Bugfix Control Center css přízraky ladit přispěl překlady dary emoji falešné rozhovory vlajky vlajka spritů plná verze gettext google-xml-Sitemaps Google Translate hlavní menší více jazyků parser Profesionální překlady uvolnění rss securityfix TENTO krátký kód zkratková Rychlost vylepšení start themeroller Trac ui video Widget wordpress.org wordpress 2.8 wordpress 3.0 WordPress MU WordPress plugin WP-super-cache XCache

Vývojový zdroj

  • Uvolnění 1.0.9.6
    duben 5, 2025
  • Drobná vylepšení kódu při úpravě rozhraní a odstranění určité odpisy ...
    Březen 22, 2025
  • Opravte nedefinovaný klíč pole
    Březen 18, 2025
  • Nakonec podporujte jQueryui 1.14.1, zkrátit kód pěkně
    Březen 17, 2025
  • Uvolnění 1.0.9.5
    Březen 15, 2025

Sociální

  • Facebook
  • Cvrlikání

Design by LPK Studio

Příspěvky (RSS) a Komentáře (RSS)

autorská práva © 2025 · Transposh LPK Studio na Genesis Framework · WordPress · Přihlásit se