You are not logged in.
Pages: 1
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
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
Pages: 1