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

  • Home
  • SEARCH
  • 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 6855843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:48:34+00:00 2026-05-27T01:48:34+00:00

2.0 + MinGW32 + Windows platform + Netbeans IDE to create my application. i

  • 0

2.0 + MinGW32 + Windows platform + Netbeans IDE to create my application. i have created the front-end but now i need to add language selection option and i want auto translation and i m new to GTK so i want detailed help. i searched on google but i didn’t found any help for doing it on windows so please help as soon as possible 🙁
I have designed my layout using gtkBuilder.

I want to know the exact steps to follow to get it done…

Please highlight how to use gettext() or_() in windows and what are .po files and how to handle them…

** Sorry for bad English…

  • 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-05-27T01:48:35+00:00Added an answer on May 27, 2026 at 1:48 am
    cat >hellogt.cxx <<EOF
    // hellogt.cxx
    #include <libintl.h>
    #include <locale.h>
    #include <iostream>
    int main (){
        setlocale(LC_ALL, "");
        bindtextdomain("hellogt", ".");
        textdomain( "hellogt");
        std::cout << gettext("hello, world!") << std::endl;
    }
    EOF
    g++ -o hellogt hellogt.cxx
    xgettext --package-name hellogt --package-version 1.2 --default-domain hellogt --output hellogt.pot hellogt.cxx
    msginit --no-translator --locale es_MX --output-file hellogt_spanish.po --input hellogt.pot
    sed --in-place hellogt_spanish.po --expression='/"hello, world!"/,/#: / s/""/"hola mundo"/'
    mkdir --parents ./es_MX.utf8/LC_MESSAGES
    msgfmt --check --verbose --output-file ./es_MX.utf8/LC_MESSAGES/hellogt.mo hellogt_spanish.po
    LANGUAGE=es_MX.utf8 ./hellogt
    

    Here is a description of the files created by the above:

    hellogt.cxx         C++ source file
    hellogt             Executable image
    hellogt.pot         Extracted text from C++ source file (portable object template)
    hellogt_spanish.po  Modified text for Spanish with translations added (using sed)
    es_MX.utf8/
     LC_MESSAGES/
       hellogt.mo       Binary translated text for Spanish used at run-time
    

    SOURCE: Complete C++ i18n gettext() "hello world" example

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

Sidebar

Related Questions

I have a working makefile that builds with mingw32. Now i renamed that makefile
I would like to install bitarray in Windows running python 2.6. I have mingw32
I need to compile my Qt application for Windows while I am using Fedora
I'm trying to compile Festival on MingW32, so I can have a Windows binary.
I'm writing a software renderer in g++ under mingw32 in Windows 7, using NetBeans
I'm relearning UNIX commands to use git on windows using MINGW32. When I launch
I am using mingw32-make to compile a project to Windows, which depends on a
My os: windows xp, ruby: 1.8.7, rails: 2.3.5 Everything was fine, but I just
How to configure mingw32 to cross-compile Direct3D Apps for Windows? Is there any possibility?
I'm trying to connect from a Windows XP system to an SVN server but

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.