/*****************************************************************************
* iso_lang.c: function to decode language code (in dvd or a52 for instance).
*****************************************************************************
- * Copyright (C) 1998-2001 VideoLAN
- * $Id: iso_lang.c,v 1.9 2003/08/17 20:39:08 fenrir Exp $
+ * Copyright (C) 1998-2004 the VideoLAN team
+ * $Id$
*
- * Author: Stéphane Borel <stef@via.ecp.fr>
+ * Author: Stéphane Borel <stef@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
/*****************************************************************************
* Local tables
*****************************************************************************/
-
-#define DEFINE_LANGUAGE_CODE(engName, nativeName, iso1, iso2T, iso2B) \
- { engName, nativeName, #iso1, #iso2T, #iso2B },
-
-static const iso639_lang_t p_languages[] =
-{
#include "iso-639_def.h"
- { NULL, NULL, NULL, NULL, NULL }
-};
static const iso639_lang_t unknown_language =
{ "Unknown", "Unknown", "??", "???", "???" };
for( p_lang = p_languages; p_lang->psz_eng_name; p_lang++ )
{
- if( !strncmp( p_lang->psz_iso639_1, psz_code, 2 ) )
+ if( !memcmp( p_lang->psz_iso639_1, psz_code, 2 ) )
{
+# if 0
if( *p_lang->psz_native_name )
{
return p_lang->psz_native_name;
}
+#endif
- return p_lang->psz_eng_name;
+ return _( p_lang->psz_eng_name );
}
}
- return "Unknown";
+ return _( "Unknown" );
}
const iso639_lang_t * GetLang_1( const char * psz_code )