Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9046501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:40:22+00:00 2026-06-16T11:40:22+00:00

I have a website that is internationalized using php’s built-in Gettext / PO support

  • 0

I have a website that is internationalized using php’s built-in Gettext / PO support

echo _("string to be translated");

The site being in beta, there are certainly some strings that don’t get translated. To help debugging, is there a way to log gettext errors, i.e. log strings for which PO has not found any matching entry in the PO file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T11:40:23+00:00Added an answer on June 16, 2026 at 11:40 am

    The problem with what you want to do is that you’ll only find untranslated strings at runtime, and only for code paths which are actually executed. It may take years for you to find all strings, and in the meantime you have to look at your log files regularly and sync your updated translations with what’s happening in the log file. That’s not a deterministic approach to translations.

    If you’re using gettext, you need to establish a workflow that’s appropriate for it. And the gettext workflow and toolchain are pretty well thought out and time tested.

    1. Prepare your source code by wrapping strings in gettext functions.
    2. Extract the prepared strings into POT files, typically using xgettext but possibly using a custom parser/extractor and a library like Kunststube\POTools (shameless self promotion).
    3. Create PO files from the extracted template files using msginit.
    4. Translate the PO files.
    5. Keep updated source/POT files in sync with PO files using msgmerge.
    6. Compile PO files to MO files using msgfmt.
    7. Rinse, repeat.

    This is the proper gettext workflow in a nutshell, and it accounts for most problems in the translation process. Especially if you have distributed translators you typically have a time lag and overlap between source code being updated and translations coming in. Without automated string extraction and the msgmerge utility it’s easy for this process to devolve into chaos, which is why you should stick to the above steps.

    If you do, your question becomes irrelevant since you can check your PO files at any time using the gettext utilities or a tool like Poedit to see which strings are untranslated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website that logs in using an STS, then gets a delegated
I have website that use XMLHttpRequest (jQuery, actually). I also have another site running
I have a website that receives files from the user, using the Choose file
I have a website that is built in ASP.NET 3.5 & SQL Server 2005,
I have a website that is currently using https for secure login and transactions.
I have a website that calculates a users involvement/activity using multiple MySQL queries. For
I have a website that consists of one parent page. Using the lightbox-style jQuery
I have a website that runs on php and mySQL. I wish to create
I have a website that has been hosted on a test site and I
I have a website that needs to be integrated deeply to facebook using open

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.