+2005-11-01 Bruno Haible <bruno@clisp.org>
+
+ * write-csharp.c (write_csharp_code): Add culture_name argument.
+ Emit an AssemblyCulture note for it.
+ (msgdomain_write_csharp): Update.
+ Suggested by Pepa <cerna.zelva@seznam.cz>.
+
2005-10-09 Bruno Haible <bruno@clisp.org>
* plural-eval.h: New file.
because applications can have their own classes called X.Y.Hashtable or
X.Y.String. */
static void
-write_csharp_code (FILE *stream, const char *class_name, message_list_ty *mlp)
+write_csharp_code (FILE *stream, const char *culture_name, const char *class_name, message_list_ty *mlp)
{
const char *last_dot;
const char *class_name_last_part;
fprintf (stream,
"/* Automatically generated by GNU msgfmt. Do not modify! */\n");
+
/* We have to use a "using" statement here, to avoid a bug in the pnet-0.6.0
compiler. */
fprintf (stream, "using GNU.Gettext;\n");
+
+ /* Assign a strong name to the assembly, so that two different localizations
+ of the same domain can be loaded one after the other. This strong name
+ tells the Global Assembly Cache that they are meant to be different. */
+ fprintf (stream, "[assembly: System.Reflection.AssemblyCulture(");
+ write_csharp_string (stream, culture_name);
+ fprintf (stream, ")]\n");
+
last_dot = strrchr (class_name, '.');
if (last_dot != NULL)
{
goto quit4;
}
- write_csharp_code (csharp_file, class_name, mlp);
+ write_csharp_code (csharp_file, culture_name, class_name, mlp);
if (fwriteerror (csharp_file))
{