You are not logged in.

#1 2013-10-17 13:41:31

pratapkumar
Member
Registered: 2013-10-17
Posts: 1

GTK internationalization Problem

Hi Everyone,

I am facing  a problem for converting  English to oriya language


#include <libintl.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>

int main(void)
   {
     setlocale( LC_ALL, "" );
     bindtextdomain( "hello", "/usr/share/locale" );
     textdomain( "hello" );
     printf( gettext( "Hello, world!\n" ) );
     exit(0);
       }


the following commands i have use to coonvert


gcc -o hello hello.c
xgettext -d hello -s -o hello.pot hello.c
msginit -l or_IN -o oriya.po -i hello.pot
msgfmt -c -v -o hello.mo oriya.po
sudo mkdir -p /usr/share/locale/or_IN/LC_MESSAGES

sudo cp hello.mo /usr/share/locale/or_IN/LC_MESSAGES
export LANG=or_IN
gcc -o hello hello.c
./hello


##########oriya.po  ####

# Oriya translations for hello example package.
# Copyright (C) 2013 Pratap
# This file is distributed under the same license as the hello example package.
# AMIGO <amigo@amigo-h61h2-i2>
#
msgid ""
msgstr ""
"Project-Id-Version: oriya\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-10-17 19:09+0530\n"
"PO-Revision-Date: 2013-10-17 19:10+0530\n"
"Last-Translator: AMIGO <amigo@amigo-h61h2-i2>\n"
"Language-Team: Oriya\n"
"Language: or\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: hello.c:10
msgid "Hello, world!\n"
msgstr "ନମସ୍କାର\n"

the output i am getting is the same Hello world but the actual output should be "ନମସ୍କାର\n"

Last edited by pratapkumar (2013-10-18 07:17:11)

Offline

#2 2013-12-16 09:48:51

mali2297
Member
From: Sweden
Registered: 2012-10-24
Posts: 4

Re: GTK internationalization Problem

Have you enabled the locale "or_IN" on the system? See the wiki page.

Alternatively, you could change the language in your example to something that is already enabled.

Offline

Board footer

Powered by FluxBB