Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
403b22d1
Commit
403b22d1
authored
Mar 13, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only define SetLanguages on platform that actually use it (Win+Mac)
parent
9709cd06
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
33 deletions
+21
-33
src/libvlc-common.c
src/libvlc-common.c
+21
-33
No files found.
src/libvlc-common.c
View file @
403b22d1
...
...
@@ -271,7 +271,10 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, char *ppsz_argv[] )
/*
* Support for gettext
*/
SetLanguage
(
""
);
#ifdef HAVE_LC_MESSAGES
setlocale
(
LC_MESSAGES
,
""
);
#endif
setlocale
(
LC_CTYPE
,
""
);
LoadMessages
();
/*
...
...
@@ -1128,6 +1131,7 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc,
return
VLC_SUCCESS
;
};
#if defined (__APPLE__) || defined (WIN32)
/*****************************************************************************
* SetLanguage: set the interface language.
*****************************************************************************
...
...
@@ -1135,29 +1139,14 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc,
* as well as the LC_CTYPE category for string sorting and possible wide
* character support.
*****************************************************************************/
static
void
SetLanguage
(
c
har
const
*
psz_lang
)
static
void
SetLanguage
(
c
onst
char
*
psz_lang
)
{
if
(
psz_lang
==
NULL
)
return
;
#if defined( ENABLE_NLS ) \
&& ( defined( HAVE_GETTEXT ) || defined( HAVE_INCLUDED_GETTEXT ) )
if
(
!*
psz_lang
)
{
# if defined( HAVE_LC_MESSAGES )
setlocale
(
LC_MESSAGES
,
""
);
# endif
setlocale
(
LC_CTYPE
,
""
);
}
else
{
#ifdef __APPLE__
/* I need that under Darwin, please check it doesn't disturb
* other platforms. --Meuuh */
setenv
(
"LANG"
,
psz_lang
,
1
);
#el
if defined( SYS_BEOS ) || defined( WIN32 )
#el
se
/* We set LC_ALL manually because it is the only way to set
* the language at runtime under eg. Windows. Beware that this
* makes the environment unconsistent when libvlc is unloaded and
...
...
@@ -1169,9 +1158,8 @@ static void SetLanguage ( char const *psz_lang )
#endif
setlocale
(
LC_ALL
,
psz_lang
);
}
#endif
}
#endif
static
inline
int
LoadMessages
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment