* Add basic NLS support, so clients can display localized strings during browsing if it's properly enabled.
This commit is contained in:
11
minidlna.c
11
minidlna.c
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user