From 3043ded6406ce8bb06392b2c6351eb7596658d11 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Thu, 17 Nov 2011 01:58:25 +0000 Subject: First steps for localization support for Mac OS X/Cocoa, including: Localizable.strings files for each plug-in. Try to get localizable string from a c string (see Pcsxr_locale_text in main.m). Each Mac plug-in now has a Principal class declaration in their Info.plist Also updated the memory card extensions git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72361 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/plugins/DFSound/macsrc/PluginController.m | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'macosx/plugins/DFSound/macsrc/PluginController.m') diff --git a/macosx/plugins/DFSound/macsrc/PluginController.m b/macosx/plugins/DFSound/macsrc/PluginController.m index 590ae034..9c2197cc 100644 --- a/macosx/plugins/DFSound/macsrc/PluginController.m +++ b/macosx/plugins/DFSound/macsrc/PluginController.m @@ -152,6 +152,7 @@ void ReadConfig(void) - (void)awakeFromNib { + //TODO: localize these, probably in their own table [interpolValue setStrings:[NSArray arrayWithObjects: @"(No Interpolation)", @"(Simple Interpolation)", @@ -175,3 +176,12 @@ void ReadConfig(void) } @end + +char* PLUGLOC(char *toloc) +{ + NSBundle *mainBundle = [NSBundle bundleForClass:[PluginController class]]; + NSString *origString = nil, *transString = nil; + origString = [NSString stringWithCString:toloc encoding:NSUTF8StringEncoding]; + transString = [mainBundle localizedStringForKey:origString value:nil table:nil]; + return [transString cStringUsingEncoding:NSUTF8StringEncoding]; +} -- cgit v1.2.3