summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authoreddyg <[email protected]>2007-08-27 03:46:08 +0000
committereddyg <[email protected]>2007-08-27 03:46:08 +0000
commitb399b95c674157b268c56b11064ad4874fde0ec7 (patch)
treedc44339e709c1d39dc3218c7d2aca16989775424 /libhb
parent62f2a3809bd4eb9cbacdacc7aa969976a61eeccd (diff)
Added support to the mac gui for auto-selecting subtitles if the main audio language is not in your native language (via the new preferences box).
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@872 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/lang.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/libhb/lang.h b/libhb/lang.h
index a1cab4d32..8b6283b4d 100644
--- a/libhb/lang.h
+++ b/libhb/lang.h
@@ -224,4 +224,19 @@ static iso639_lang_t * lang_for_code( int code )
return (iso639_lang_t*) languages;
}
+static iso639_lang_t * lang_for_english( const char * english )
+{
+ iso639_lang_t * lang;
+
+ for( lang = (iso639_lang_t*) languages; lang->eng_name; lang++ )
+ {
+ if( !strcmp( lang->eng_name, english ) )
+ {
+ return lang;
+ }
+ }
+
+ return (iso639_lang_t*) languages;
+}
+
#endif