]> git.sesse.net Git - vlc/blobdiff - src/misc/darwin_specific.m
- Call dgettext directly with shared libvlc and libtool
[vlc] / src / misc / darwin_specific.m
index 3aa2163c5a5c6145f7494417718ebce6ee441c7f..5dc48a8b473728a1f9d9f9587223bf3aa546fb94 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * darwin_specific.m: Darwin specific features
  *****************************************************************************
- * Copyright (C) 2001-2004 VideoLAN
+ * Copyright (C) 2001-2004 the VideoLAN team
  * $Id$
  *
  * Authors: Sam Hocevar <sam@zoy.org>
@@ -19,7 +19,7 @@
  *
  * 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.
  *****************************************************************************/
 #include <string.h>                                              /* strdup() */
 #include <stdlib.h>                                                /* free() */
@@ -27,6 +27,7 @@
 #include <vlc/vlc.h>
 
 #include <Cocoa/Cocoa.h>
+#include <CoreFoundation/CFString.h>
 
 #ifdef HAVE_LOCALE_H
 #   include <locale.h>
@@ -49,10 +50,15 @@ static int FindLanguage( const char * psz_lang )
         "French", "fr",
         "Italian", "it",
         "Japanese", "ja",
+        "Korean", "ko",
+       "Georgian", "ka",
         "Dutch", "nl",
+       "Occitan", "oc",
         "Brazillian Portuguese", "pt_BR",
+        "Romanian", "ro",
         "Russian", "ru",
         "Turkish", "tr",
+        "Simplified Chinese", "zh_CN", 
         "Chinese Traditional", "zh_TW",
         NULL
     };
@@ -113,6 +119,9 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
 
         [o_pool release];
     }
+
+    vlc_mutex_init( p_this, &p_this->p_libvlc->iconv_lock );
+    p_this->p_libvlc->iconv_macosx = vlc_iconv_open( "UTF-8", "UTF-8-MAC" );
 }
 
 /*****************************************************************************
@@ -129,5 +138,9 @@ void system_Configure( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
 void system_End( vlc_t *p_this )
 {
     free( p_this->p_libvlc->psz_vlcpath );
+
+    if ( p_this->p_libvlc->iconv_macosx != (vlc_iconv_t)-1 )
+        vlc_iconv_close( p_this->p_libvlc->iconv_macosx );
+    vlc_mutex_destroy( &p_this->p_libvlc->iconv_lock );
 }