Steve,
Any suggestion as to where would be the proper place in the app to insert the ref statement so that the server serves time names in languages other than English?
Thanks.
Setting @@lc_time_names
5 posts
• Page 1 of 1
Setting @@lc_time_namesSteve,
Any suggestion as to where would be the proper place in the app to insert the ref statement so that the server serves time names in languages other than English? Thanks.
Re: Setting @@lc_time_namesSteve,
I am going to look into sending this as a mysql_query or df_query via the app's beforeHandleRequest() on conf_ApplicationDelegate, but I would appreciate your comments anyway. Thanks
Re: Setting @@lc_time_namesYes. Put this inside a mysql_query.
Re: Setting @@lc_time_namesThanks Steve. It works, with caveats, see below.
For those who may have been following this thread, passing the setting to the MySQL session via (on conf/ApplicationDelegate.php)
works, but only sets the output to whatever locale you choose when the output is managed by MySQL's date format functions. When using php's format functions this setting is of little value. (obvious in hindsight, but not on my first rookie attempt...) Next step is to try to complete the circle via php's setlocale() and will eventually revert here. Last edited by Cabeza on Sat Oct 13, 2012 5:42 am, edited 1 time in total.
Re: Setting @@lc_time_names(the story goes on...)
adding
on beforeHandleRequest() takes care of the php output strings, but it also means that uses of date() have to be refactored to strftime(). Date() is English only and takes no hints from setlocale(). There are a few things to take care when using setlocale() (Check php.net for the nitty gritty). The most important for me -and as warned by Lodovico Grossi @ http://us2.php.net/manual/en/function.setlocale.php- is that using LC_ALL may make a mess of the strings used on mysql_query() calls, so watch out. That is the reason why I went for the less greedy LC_TIME. Hope it helps. Xataface version: 1.3.2 on OSX 10.8.x Apache 2.2.22 php 5.3 MySQL 5.5.16
5 posts
• Page 1 of 1
Who is onlineUsers browsing this forum: No registered users and 15 guests |