Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
62eff4b0
Commit
62eff4b0
authored
May 11, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get iso936 code from language name.
parent
30a615da
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
include/vlc_iso_lang.h
include/vlc_iso_lang.h
+1
-0
src/libvlccore.sym
src/libvlccore.sym
+1
-0
src/text/iso_lang.c
src/text/iso_lang.c
+19
-0
No files found.
include/vlc_iso_lang.h
View file @
62eff4b0
...
...
@@ -42,6 +42,7 @@ extern "C" {
VLC_EXPORT
(
const
iso639_lang_t
*
,
GetLang_1
,
(
const
char
*
)
);
VLC_EXPORT
(
const
iso639_lang_t
*
,
GetLang_2T
,
(
const
char
*
)
);
VLC_EXPORT
(
const
iso639_lang_t
*
,
GetLang_2B
,
(
const
char
*
)
);
VLC_EXPORT
(
const
iso639_lang_t
*
,
GetLang_iso936
,
(
const
char
*
)
);
#if defined( __cplusplus )
}
#endif
...
...
src/libvlccore.sym
View file @
62eff4b0
...
...
@@ -136,6 +136,7 @@ GetFallbackEncoding
GetLang_1
GetLang_2B
GetLang_2T
GetLang_iso936
httpd_ClientIP
httpd_ClientModeBidir
httpd_ClientModeStream
...
...
src/text/iso_lang.c
View file @
62eff4b0
...
...
@@ -77,3 +77,22 @@ const iso639_lang_t * GetLang_2B( const char * psz_code )
return
&
unknown_language
;
}
const
iso639_lang_t
*
GetLang_iso936
(
const
char
*
psz_lang
)
{
const
iso639_lang_t
*
p_lang
;
if
(
psz_lang
==
NULL
||
*
psz_lang
==
'\0'
)
return
&
unknown_language
;
for
(
p_lang
=
p_languages
;
p_lang
->
psz_iso639_1
!=
NULL
;
p_lang
++
)
{
if
(
!
strcasecmp
(
p_lang
->
psz_eng_name
,
psz_lang
)
||
!
strcasecmp
(
p_lang
->
psz_native_name
,
psz_lang
)
||
!
strcasecmp
(
p_lang
->
psz_iso639_1
,
psz_lang
)
||
!
strcasecmp
(
p_lang
->
psz_iso639_2T
,
psz_lang
)
||
!
strcasecmp
(
p_lang
->
psz_iso639_2B
,
psz_lang
)
)
return
p_lang
;
}
return
&
unknown_language
;
}
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