diff options
author | jstebbins <[email protected]> | 2009-07-17 23:02:11 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2009-07-17 23:02:11 +0000 |
commit | f067608af197f3c6ebc47685274486854bb04a77 (patch) | |
tree | d8a2caedd0079302fb70dba720754578d235a681 /gtk/src/presets.c | |
parent | 04af4ca556aec7a60456206ffe38badafe3b4d73 (diff) |
LinGui: switch to using the native_name field of the language table
when it's available, it's a better choice since users will recognize
their it easier when it is written in their native language
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2708 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/presets.c')
-rw-r--r-- | gtk/src/presets.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gtk/src/presets.c b/gtk/src/presets.c index f3d26c7aa..43babd138 100644 --- a/gtk/src/presets.c +++ b/gtk/src/presets.c @@ -1905,7 +1905,14 @@ export_lang_xlat2(GValue *lin_val) { if (strcmp(str, ghb_language_table[ii].iso639_2) == 0) { - gval = ghb_string_value_new(ghb_language_table[ii].eng_name); + const gchar *lang; + + if (ghb_language_table[ii].native_name[0] != 0) + lang = ghb_language_table[ii].native_name; + else + lang = ghb_language_table[ii].eng_name; + + gval = ghb_string_value_new(lang); g_free(str); return gval; } @@ -1951,7 +1958,8 @@ import_lang_xlat2(GValue *mac_val) str = ghb_value_string(mac_val); for (ii = 0; ghb_language_table[ii].eng_name; ii++) { - if (strcmp(str, ghb_language_table[ii].eng_name) == 0) + if ((strcmp(str, ghb_language_table[ii].eng_name) == 0) || + (strcmp(str, ghb_language_table[ii].native_name) == 0)) { gval = ghb_string_value_new(ghb_language_table[ii].iso639_2); g_free(str); |