/oss · 6 merged

php-gettext/Gettext

A PHP library that reads and writes translation files for multilingual apps.

the project on GitHub (opens in a new tab)
  1. 3 Dec 2026

    A string used again can get its translation back

    What was broken
    When a text came back into the code after being removed, merging kept it marked as old, so its saved translation never reached the app.
    What I changed
    A new opt-in merge setting keeps the active state from the fresh scan.
    Why it matters
    Translations come back when the text does, like the standard gettext tools do.

    see the code, #319 (opens in a new tab)

  2. 30 Nov 2026

    Merging with a template keeps plural translations

    What was broken
    Updating a translation from a new template threw away its plural translations, because the template's empty plural slots were treated as real values.
    What I changed
    Plural translations now count as set only when one of them has text, so the existing ones are kept.
    Why it matters
    Updating translation files no longer wipes the plural forms translators already wrote.

    see the code, #318 (opens in a new tab)

  3. 30 Nov 2026

    Unsure translations are left out of compiled files

    What was broken
    Translations marked as unsure, which happens to every changed text after an update, were still compiled in. Apps showed the old translation for the new text instead of the original.
    What I changed
    Unsure translations are now left out by default, as the standard gettext tool does. An option keeps them for those who want it.
    Why it matters
    Users see the original text until a translator checks the change, not an outdated translation.

    see the code, #317 (opens in a new tab)

  4. 27 Nov 2026

    Translations keep their plural rules by default

    What was broken
    Translation files made the way the guide shows left out the plural rules, so Russian, Polish, Arabic and others used English plurals and showed wrong words.
    What I changed
    I made it write the header with the plural rules by default, as the standard tool does.
    Why it matters
    Plural words come out right in languages with more than two forms.

    see the code, #316 (opens in a new tab)

  5. 24 Nov 2026

    Saved translation files keep quotes in headers valid

    What was broken
    Saving a translation file whose translator name had quotes, as Weblate writes it, produced a file the standard gettext tools reject.
    What I changed
    Header values are now escaped when the file is written.
    Why it matters
    Translation files round-trip through this library and still compile.

    see the code, #315 (opens in a new tab)

  6. 20 Nov 2026

    Translation files keep the comments at the top

    What was broken
    When a translation file was read, every comment before an empty comment line was lost. That is the standard header, so saving the file again dropped its copyright, license and translator lines.
    What I changed
    Those comments are now kept and attached to the entry that follows.
    Why it matters
    Loading and saving a translation file no longer erases who wrote it and under what license.

    see the code, #314 (opens in a new tab)

← every project