Re: [Vala] vala-list Digest, Vol 124, Issue 13



    > On Wednesday, 28 March 2018, 18:03:44 BST, Fernando Silva <wild nando gmail com> wrote:  > I bet this 
could be decided based on locale with gettext

Now, there's a challenge :) 
Gettext is very good with plurals (https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html).I 
didn't find anything on date presentation though.
There is the Posix nl_langinfo:
void main () {    Intl.setlocale ();
    print (Posix.nl_langinfo (Posix.D_FMT) + "\n");
}
but all that does is return the format based on the forward slash separator. This can then be used instrftime 
or GLib.DateTime.format(). For my locale (en_GB) I get %d/%m/%y

Al



  


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]