www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Localization (i18n) Options

reply Gerald <me me.com> writes:
I have a GtkD application for Linux where I would like to support 
localization. The current options in D seem pretty limited with 
the most recent being i18n-d 
(https://github.com/JakobOvrum/i18n-d). My code is structured for 
GNU gettext but I could make the effort and convert it to the way 
i18n-d works if that's the best option. The only other issue I 
can see with it is that it doesn't support country-language 
variations and from past experience that's a pretty big deal 
(just ask any Brazilians!).

I'd prefer a GNU gettext implementation but I know that's not 
available since it has been listed as a GSOC project for a couple 
of years. I could roll my own GNU gettext implementation but that 
would be a significant effort taking away time from my project 
which I'd prefer to remain focused on.

Are there any other options out there that I might not be aware 
of?
Jan 16
next sibling parent reply Gerald <me me.com> writes:
On Sunday, 17 January 2016 at 02:51:30 UTC, Gerald wrote:
 Are there any other options out there that I might not be aware 
 of?
And of course, 10 minutes later you stumble across a potential option. Looks like GLib exposes gettext and GtkD does wrap it so I'll play around with that and see if I can get it working. My apologies for the noise.
Jan 16
parent reply Luis <luis.panadero gmail.com> writes:
On Sunday, 17 January 2016 at 03:03:14 UTC, Gerald wrote:
 On Sunday, 17 January 2016 at 02:51:30 UTC, Gerald wrote:
 Are there any other options out there that I might not be 
 aware of?
And of course, 10 minutes later you stumble across a potential option. Looks like GLib exposes gettext and GtkD does wrap it so I'll play around with that and see if I can get it working. My apologies for the noise.
Please, write a HowTo some where. GtkD lack of documentation it's very anoying.
Jan 18
next sibling parent reply Gerald <me me.com> writes:
On Monday, 18 January 2016 at 09:04:48 UTC, Luis wrote:
 On Sunday, 17 January 2016 at 03:03:14 UTC, Gerald wrote:
 On Sunday, 17 January 2016 at 02:51:30 UTC, Gerald wrote:
 Are there any other options out there that I might not be 
 aware of?
And of course, 10 minutes later you stumble across a potential option. Looks like GLib exposes gettext and GtkD does wrap it so I'll play around with that and see if I can get it working. My apologies for the noise.
Please, write a HowTo some where. GtkD lack of documentation it's very anoying.
I'll keep that in mind as I know I've struggled with that myself. I have a couple of blog posts on GtkD on my site that cover how to do a couple of interesting things that you can view here http://gexperts.com and I'll probably add more as I have time. I've also contributed a couple of demos to GtkD, one for multithreading with GTK and the other on using GIO actions and popovers. I also contributed a script that generates ddox for GtkD instead of candydoc, even though the content is the same the ddox is much better IMHO since it includes a search capability and cross references items. I hated in candydoc that it showed a method using GtkDialogFlags and I then had to grep for it to see what the flags actually are. In ddox it's all cross referenced so you can just click on the link to it to view it. Finally, if you are interested you can follow my two GtkD based projects, terminix and vgrep, on github (https://github.com/gnunn1 for concrete examples of working with GtkD.
Jan 18
next sibling parent reply Luis <luis.panadero gmail.com> writes:
On Monday, 18 January 2016 at 14:00:05 UTC, Gerald wrote:
 On Monday, 18 January 2016 at 09:04:48 UTC, Luis wrote:
 On Sunday, 17 January 2016 at 03:03:14 UTC, Gerald wrote:
 On Sunday, 17 January 2016 at 02:51:30 UTC, Gerald wrote:
 Are there any other options out there that I might not be 
 aware of?
And of course, 10 minutes later you stumble across a potential option. Looks like GLib exposes gettext and GtkD does wrap it so I'll play around with that and see if I can get it working. My apologies for the noise.
Please, write a HowTo some where. GtkD lack of documentation it's very anoying.
I'll keep that in mind as I know I've struggled with that myself. I have a couple of blog posts on GtkD on my site that cover how to do a couple of interesting things that you can view here http://gexperts.com and I'll probably add more as I have time. I've also contributed a couple of demos to GtkD, one for multithreading with GTK and the other on using GIO actions and popovers. I also contributed a script that generates ddox for GtkD instead of candydoc, even though the content is the same the ddox is much better IMHO since it includes a search capability and cross references items. I hated in candydoc that it showed a method using GtkDialogFlags and I then had to grep for it to see what the flags actually are. In ddox it's all cross referenced so you can just click on the link to it to view it. Finally, if you are interested you can follow my two GtkD based projects, terminix and vgrep, on github (https://github.com/gnunn1 for concrete examples of working with GtkD.
I browse your code and grestful code a few times. I did stuff with GtkD on a different approach, using GtkBuilder and Gtk autolink of functions by name. I try to avoid generating the GUI interface by code, so I can do changes editing an XML with a visual tool. I need to clean my code base before anyone could try to use it as example. I wrote a few years ago on a quick & dirty way. Were I can find the script to generate ddox for GtkD ? PD: I'm the only guy that think that a hypothetical implementation of GtkBuilder running on CTFE would be great ? So generates the GUI on compile time instead of parsing and generating stuff on runtime ?
Jan 18
next sibling parent Mike Wey <mike-wey example.com> writes:
On 01/18/2016 04:06 PM, Luis wrote:
 Were I can find the script to generate ddox for GtkD ?
https://github.com/gtkd-developers/GtkD/blob/master/makeddox.sh -- Mike Wey
Jan 18
prev sibling parent karabuta <karabutaworld gmail.com> writes:
On Monday, 18 January 2016 at 15:06:12 UTC, Luis wrote:
 On Monday, 18 January 2016 at 14:00:05 UTC, Gerald wrote:
 [...]
I browse your code and grestful code a few times. I did stuff with GtkD on a different approach, using GtkBuilder and Gtk autolink of functions by name. I try to avoid generating the GUI interface by code, so I can do changes editing an XML with a visual tool. I need to clean my code base before anyone could try to use it as example. I wrote a few years ago on a quick & dirty way. Were I can find the script to generate ddox for GtkD ? PD: I'm the only guy that think that a hypothetical implementation of GtkBuilder running on CTFE would be great ? So generates the GUI on compile time instead of parsing and generating stuff on runtime ?
+1
Jan 18
prev sibling parent Johannes Pfau <nospam example.com> writes:
Am Mon, 18 Jan 2016 14:00:05 +0000
schrieb Gerald <me me.com>:

 On Monday, 18 January 2016 at 09:04:48 UTC, Luis wrote:
 On Sunday, 17 January 2016 at 03:03:14 UTC, Gerald wrote:  
 On Sunday, 17 January 2016 at 02:51:30 UTC, Gerald wrote:  
 Are there any other options out there that I might not be 
 aware of?  
And of course, 10 minutes later you stumble across a potential option. Looks like GLib exposes gettext and GtkD does wrap it so I'll play around with that and see if I can get it working. My apologies for the noise.
Please, write a HowTo some where. GtkD lack of documentation it's very anoying.
I'll keep that in mind as I know I've struggled with that myself. I have a couple of blog posts on GtkD on my site that cover how to do a couple of interesting things that you can view here http://gexperts.com and I'll probably add more as I have time. I've also contributed a couple of demos to GtkD, one for multithreading with GTK and the other on using GIO actions and popovers.
Nice stuff. You should do some advertising for these nice blog posts. Posting to D.announce and adding links from gtkd.org would be great.
Jan 18
prev sibling parent reply Gerald <me me.com> writes:
On Monday, 18 January 2016 at 09:04:48 UTC, Luis wrote:
 Please, write a HowTo some where. GtkD lack of documentation 
 it's very anoying.
I've gotten this going with Terminix and posted some information what it took to get it going here: http://gexperts.com/wp/gtkd-and-localization/
Jan 24
parent Luis <luis.panadero gmail.com> writes:
On Sunday, 24 January 2016 at 19:18:28 UTC, Gerald wrote:
 On Monday, 18 January 2016 at 09:04:48 UTC, Luis wrote:
 Please, write a HowTo some where. GtkD lack of documentation 
 it's very anoying.
I've gotten this going with Terminix and posted some information what it took to get it going here: http://gexperts.com/wp/gtkd-and-localization/
:thumbsup:
Jan 24
prev sibling parent Jakob Ovrum <jakobovrum gmail.com> writes:
On Sunday, 17 January 2016 at 02:51:30 UTC, Gerald wrote:
 I have a GtkD application for Linux where I would like to 
 support localization. The current options in D seem pretty 
 limited with the most recent being i18n-d 
 (https://github.com/JakobOvrum/i18n-d). My code is structured 
 for GNU gettext but I could make the effort and convert it to 
 the way i18n-d works if that's the best option. The only other 
 issue I can see with it is that it doesn't support 
 country-language variations and from past experience that's a 
 pretty big deal (just ask any Brazilians!).
FWIW, country variation is on the TODO list (issue tracker).
 I'd prefer a GNU gettext implementation but I know that's not 
 available since it has been listed as a GSOC project for a 
 couple of years. I could roll my own GNU gettext implementation 
 but that would be a significant effort taking away time from my 
 project which I'd prefer to remain focused on.
Part of the point behind i18n-d is that we can do better than gettext in D.
Jan 16