a hello world introduction to internationalization in Linux using C

Hello, world!
i was thinking to read/write some do-it-yourself code for internationalization. This Awesome link explains it all. what is i18n and everything of how to do that in your code. Now obviously i tried the whole process, changed my LANG variable by bn_IN but no change in output. it was old “hello, world!” 😦
i searched a bit and then come up with the fact that i’ll have to first select the locale for using.

The steps are:

0. See the supported locales by : $ cat /usr/share/i18n/SUPPORTED (you can see, for bangla, it is bn_IN UTF-8 (see te space between bn_IN and UTF-8 .. it’s not ‘.’ it’s a space))
1. $ sudo gedit /var/lib/locales/supported.d/local

2. for Bengali, you add bn_IN UTF-8

3.$ sudo dpkg-reconfigure locales

4. if all goes well, export the environment variables LANG and LANGUAGE as:
$ export LANG=bn_IN
$ export LANGUAGE=bn_IN:bn

5. run your program. 🙂 hopefully it’ll work. worked for me!


google search in address url bar in mozilla Firefox

Like ChromeBrowser of google, Firefox has also integrated google (and any other search engines and that’s configurable) search in their urlbar commonly referred as address bar. Now recently all my firefox settings were destroyed thanks to a awry installation of Pearltrees. I found my urlbar search feature no longer works. Here is how i restored it.

1. i went to the urlbar and typed about:config.. confirmed my sanity and there’s a nice page full of many options (keys and values)

2. i searched for keyword.URL key. Double clicked it to change the value tohttp://www.google.com/search?ie=UTF-8&oe=UTF-8&q=

3. i searched for keyword.enable key and made the value TRUE


Resources: http://kb.mozillazine.org/Keyword.URL


(re) compiling stuff and all

This is a blog post after over an year. and i call this year a black period of my life. nothing was done. literally. there is absolutely nothing i can say that i did in the whole fucking year. except brooding over lack of general inspirations. obviously i’m an idiot and i guess everybody knew this all along the way. except me. and now that i’ve realised it, i’m going to, erm, re-structure a thing or two on my usually (again complain :P) less-spacious table.

Just read a blogpost about compilers (and the meaning of life !) and that was cool. one hour from now i’m going to teach python and general programing tid-bits to local schoolchildren for the 6th day and i love it.

as i’m approaching slowly to my final straw (explanations on a future blog post) i’m having The Muses   having a good look on me. this little 2 hour sessions of programming with these schoolchildren of grade 9 to 12 has given me yet another idea about making something fundamentally different and progressive approach for the dreaded “programming” stuff to the, erm, normal people with all their hairs (yes, both the way) intact.

hope to see you in 6 months on this. hehe.

GtkPlug and GtkSocket

i’ve just found out my try programs to clear the idea of the confusing and undocumented gtk widgets.

please download this http://cse.iitkgp.ac.in/~debmalya/source_code/gtkPlug_gtkSocket_explained.tar.gz


though i’m still very novice with this, if you have any problems, post a comment.. i’ll see to that.


after the frustrating period of hacking and making my homebrew vlc instance run and play media.. i had my dinner at  tikka and came back in lab to refresh myself with newer ideas.

and what else.. mit media lab projects.. =)

Lifelong Kindergarten.. glad to see that Sayamindu da is in there .. at that particular research group.. =)








GTK+2 instance of VLC player

i was working on a gtk+ instance of the popular media player VLC. I stumbled upon a nice project, FreeTuxTV at google codes. It implemented the library libvlc-gtk by which it draws a vlc instance in their application.

hen i got a program written in gtk  for a simple VLC instance.

i tried for about 1 week to make the code compile but in vain..  i mailed several persons and among them, Eric Beuque, the creator of that project replied me with some nice help. But then also i was unable to figure out how to make it work.

today.. in the morning i saw, firstly, the third party code was not right. it had a number of errors in it and i don’t have a idea how the other people in that forum compiled and run it successfully.

i corrected them and then compiled my program with

gcc -g -DLIBVLC_VERSION_MAJOR=1 -DLIBVLC_VERSION_MINOR=1 -DLIBVLC_VERSION_REVISION=0 -o myapp `pkg-config –cflags –libs gtk+-2.0 gthread-2.0 libvlc` -I/usr/include/libvlc-gtk/ -lvlc-gtk -L /usr/local/lib/ a.c libvlc-gtk/gtk-libvlc-instance.c libvlc-gtk/gtk-libvlc-media.c libvlc-gtk/gtk-libvlc-media-player.c

and whoa.. it got compiled.

a nice concept clearing is the extra on this little hack.. i cleared my notions about gc at http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html and also browsed the pkg-config for compilation details.

off for now =)