* Add basic NLS support, so clients can display localized strings during browsing if it's properly enabled.

This commit is contained in:
Justin Maggard
2010-07-17 00:47:48 +00:00
parent c5b2f2171f
commit 291b31f98a
4 changed files with 57 additions and 29 deletions

View File

@ -27,9 +27,12 @@
#include <pthread.h>
#include <pwd.h>
/* unix sockets */
#include "config.h"
#ifdef ENABLE_NLS
#include <libintl.h>
#endif
#include "upnpglobalvars.h"
#include "sql.h"
#include "upnphttp.h"
@ -701,6 +704,12 @@ main(int argc, char * * argv)
struct timeval lastbeacontime = {0, 0};
#endif
#ifdef ENABLE_NLS
setlocale(LC_MESSAGES, "");
setlocale(LC_CTYPE, "en_US.utf8");
textdomain("minidlna");
#endif
if(init(argc, argv) != 0)
return 1;