2
* Copyright (C) 2004 Jorn Baayen <jorn@nl.linux.org>
4
* Modified by Todd Berman <tberman@sevenl.net> to fit with MonoDevelop.
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License as
8
* published by the Free Software Foundation; either version 2 of the
9
* License, or (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* General Public License for more details.
16
* You should have received a copy of the GNU General Public
17
* License along with this program; if not, write to the
18
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
* Boston, MA 02111-1307, USA.
21
* !!! Note that this class has to have the same API as the one
22
* from GNU.Gettext.dll, because otherwise the strings won't
23
* be picked up by update-po.
27
using System.Runtime.InteropServices;
29
using MonoDevelop.Core;
33
namespace MonoDevelop.Core
36
public class GettextCatalog
38
static GettextCatalog ()
40
Catalog.Init ("monodevelop", "@prefix@/share/locale");
43
private GettextCatalog ()
47
public static string GetString (string str)
49
return str != null ? Catalog.GetString (str) : null;
52
public static string GetString (string str, params object[] arguments)
54
return string.Format (GetString (str), arguments);
57
public static string GetPluralString (string singular,
61
return Catalog.GetPluralString (singular, plural, n);
64
public static string GetPluralString (string singular,
67
params object[] arguments)
69
return string.Format(GetPluralString (singular, plural, n), arguments);