AlmaLinux PHP Gettext Backup Translation Tutorial
โœ‚๐Ÿƒ๐Ÿพโ€โ™€๏ธ๐Ÿƒ๐Ÿผโ€โ™‚๏ธ
๐Ÿ“–

AlmaLinux PHP Gettext Backup Translation Tutorial

AlmaLinux PHP Gettext Backup Translation Tutorial

As we intimated earlier, using PHP gettext is a good framework to use regarding writing your own serverside language translation functionality, but the โ€œgruntworkโ€ is there ahead of you maintaining those [domain].po (Poedit) files. And so, improving on yesterdayโ€™s AlmaLinux PHP Gettext Your Own Translation Tutorial โ€ฆ

  • Why donโ€™t we back up an โ€œinsufficient dataโ€ or โ€œunknownโ€ translation ask from a user, now that they can enter their own words/phrases, by presenting a popup window Google Translate window as a backup?
  • Why donโ€™t we set up a system to follow up on moderations being attended to and accepted by administrative overseers, by adding those words/phrases accepted โ€ฆ
    <?php

    $lastfile="";
    if (file_exists('/tmp/get_text_moderation.txt')) {
    $lines=explode("\n", file_get_contents('/tmp/get_text_moderation.txt'));
    for ($ilines=0; $ilines<sizeof($lines); $ilines++) {
    if (strpos($lines[$ilines], DIRECTORY_SEPARATOR . 'LC_MESSAGES' . DIRECTORY_SEPARATOR) !== false) {
    $lastfile=$lines[$ilines];
    } else if (strpos($lines[$ilines], ' msgid ') !== false && strpos($lines[$ilines], '_await') !== false) {
    if (strpos(file_get_contents($lastfile), " msgid " . explode('_await', explode(' msgid ', $lines[$ilines])[1])[0] . '"' ) !== false) {
    $wordopt.="<option value='" . explode('_await', explode(' msgid "', $lines[$ilines])[1])[0] . "'>" . explode('_await', explode(' msgid "', $lines[$ilines])[1])[0] . "</option>" . "\n";
    }
    }
    }
    }

    ?>
    โ€ฆ through to the Words/Phrases dropdown, in the web application?

Well?! Huh?!

We think so, and you can see this in action with thechanged get_textโšซphp PHP Gettext Using web application you can also try below.

We hope you like it!



Previous relevant AlmaLinux PHP Gettext Your Own Translation Tutorial is shown below.

AlmaLinux PHP Gettext Your Own Translation Tutorial

AlmaLinux PHP Gettext Your Own Translation Tutorial

To open up yesterdayโ€™s AlmaLinux PHP Gettext Translation Tutorialโ€˜s PHP Gettext Using web application to the possibility of โ€ฆ

  • user supplying a new locale into the mix โ€ฆ and โ€ฆ
  • user supplying their own English to โ€œTheir Newly Introduced Localeโ€ word/phrase translation

โ€ฆ is fine and good in principle, but needs moderation, and that requires a deal of thinking. But then we thought, as far as moderation goes, why donโ€™t we โ€ฆ

This entry was posted in eLearning, Event-Driven Programming, Operating System, Tutorials and tagged , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *