title: Rename default context menu title on right click in webview for cocoa [Objective C]
body: <p>I need to open a link in new tab in webview. But on right clik, the context menu is showing <code>Open Link In New Window</code> with other menus but no <code>Open Link In New Tab</code>. And on clicking <code>Open Link In New Window</code>, it'll open in new tab (I enabled tabbing mode on). But I am <strong>unable to change the title</strong> from <code>Open Link In New Window</code> to <code>Open Link In New Tab</code> and <strong>if I change the title, it won't work</strong>. I couldn't find the solution yet. I am using webView, not WKWebView.</p>
  
  <p><strong>If my question is duplicate, please refer me to original.</strong></p>
  
  <p><strong>Objective C please..</strong></p>
  
  <p>Edit: My code</p>
  
  <pre><code>-(NSArray *)webView:(WebView *)sender contextMenuItemsForElement:(NSDictionary *)element defaultMenuItems:(NSArray *)defaultMenuItems
  {
      NSMutableArray *modifiedMenuItems=[[NSMutableArray alloc]init];
      modifiedMenuItems=[defaultMenuItems mutableCopy];
      NSMenuItem *mItem=[[NSMenuItem alloc]init];
      int i=0;
      while(i&lt;[modifiedMenuItems count])
      {
          mItem=[modifiedMenuItems objectAtIndex:i];
          if([mItem tag]==WebMenuItemTagOpenLinkInNewWindow)
          {
              [mItem setTitle:@"Open Link in New Tab"];
              [modifiedMenuItems replaceObjectAtIndex:i withObject:mItem];
              //Here I renamed the title and replaced. But it doesn't works.
              //It is showing like a disabled one.
              //So I added the next line code prior to replacement.
              [mItem setEnabled:YES];
          }
      }
      return modifiedMenuItems;
  }
  </code></pre>