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 8668267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:10:17+00:00 2026-06-12T18:10:17+00:00

I have been trying for hours finding a way to setup POEdit so that

  • 0

I have been trying for hours finding a way to setup POEdit so that it can grab the text from specific domain only

My gettext function looks like this:

function ri($id, $parameters = array(), $domain = 'default', $locale = null)

A sample call:

echo ri('Text %xyz%', array('%xyz%'=>100), 'myDomain');

I will need to grab only the text with the domain myDomain to translate, or at least I want POEdit to put these texts into domain specific files. Is there a way to do it?

I found several questions that are similar but the answers don’t really tell me what to do (I think I’m such a noob it must be explained in plain English for me to understand):

How to set gettext text domain in Poedit?

How to get list of translatable messages

  • 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-12T18:10:18+00:00Added an answer on June 12, 2026 at 6:10 pm

    So I finally figured it out after days of searching, I finally found the answer here:

    http://sourceforge.net/mailarchive/message.php?msg_id=27691818

    • xgettext recognizes context in strings, and gives a msgctxt field in the *.pot file, which is recognized by translation software as a
      context and is shown as such (check image of Pootle showing context
      below)

      • This can be done in 3 ways:

        1. String in code should be in the format _t(‘context’,’string’); and xgettext invocation should be in the form –keyword=_t:1c,2
          (this basically explains to xgettext that there are 2 arguments in
          the keyword function, 1st one is context, 2nd one is string)
        2. String in code in the format _t(‘string’,’context’); and xgettext invocation should be in the form –keyword=_t:1,2c
        3. String in the code should be as _t(‘context|string’) and xgettext invocation should be in the form –keyword=_t:1g

    So to answer my own question, I added this to the “sources keywords” tab of Poedit:

    ri:1,3c
    

    ri is the function name, 1 is the location of the stringid, 3 is the location of the context/domain

    Hope this helps someone else, I hate all these cryptic documents

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

Sidebar

Related Questions

I have been trying to extract hours, seconds and minutes from an input text
I have been trying for hours to find a way to solve the issue,
I have been fruitlessly trying for several hours to make a function that filter
I have a problem that I have been trying to figure out for hours
I have been trying for hours to pass a resource from one Activity to
I have been trying to remove this Firebug Console Error from last few hours.
I have been trying for hours to fix this code, I can't see what's
I have been trying for too many hours now myself and can't get the
This is crazy, I have been trying for hours to get this to work.
I have been trying this for hours without success. http://replicaisland.googlecode.com/svn/trunk/ I have added the

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.