summaryrefslogtreecommitdiff
path: root/fluid/proj/i18n.h
diff options
context:
space:
mode:
Diffstat (limited to 'fluid/proj/i18n.h')
-rw-r--r--fluid/proj/i18n.h36
1 files changed, 23 insertions, 13 deletions
diff --git a/fluid/proj/i18n.h b/fluid/proj/i18n.h
index 0d9119ca2..65ef72bf6 100644
--- a/fluid/proj/i18n.h
+++ b/fluid/proj/i18n.h
@@ -17,7 +17,9 @@
#ifndef FLUID_PROJ_I18N_H
#define FLUID_PROJ_I18N_H
-#include <string>
+#include <FL/fl_string_functions.h>
+#include <stdlib.h>
+#include <string.h>
namespace fld {
@@ -54,35 +56,44 @@ public:
Project &project_;
/// One of the available internationalization types.
- fld::I18n_Type type = FLD_I18N_TYPE_NONE;
+ fld::I18n_Type type;
/// Include file for GNU i18n, writes an #include statement into the source
/// file. This is usually `<libintl.h>` or `"gettext.h"` for GNU gettext.
- std::string gnu_include = "<libintl.h>";
+ char *gnu_include;
// Optional name of a macro for conditional i18n compilation.
- std::string gnu_conditional = "";
+ char *gnu_conditional;
/// For the gettext/intl.h options, this is the function that translates text
/// at runtime. This is usually "gettext" or "_".
- std::string gnu_function = "gettext";
+ char *gnu_function;
/// For the gettext/intl.h options, this is the function that marks the translation
/// of text at initialisation time. This is usually "gettext_noop" or "N_".
- std::string gnu_static_function = "gettext_noop";
+ char *gnu_static_function;
/// Include file for Posix i18n, write a #include statement into the source
/// file. This is usually `<nl_types.h>` for Posix catgets.
- std::string posix_include = "<nl_types.h>";
+ char *posix_include;
// Optional name of a macro for conditional i18n compilation.
- std::string posix_conditional = "";
+ char *posix_conditional;
/// Name of the nl_catd database
- std::string posix_file = "";
+ char *posix_file;
/// Message set ID for the catalog.
- std::string posix_set = "1";
+ char *posix_set;
public: // Methods
- I18n(Project &p) : project_(p) {};
- ~I18n() = default;
+ I18n(Project &p);
+ ~I18n();
void reset();
void read(io::Project_Reader &f, const char *key);
void write(io::Project_Writer &f) const;
+
+ void set_gnu_include(const char *s);
+ void set_gnu_conditional(const char *s);
+ void set_gnu_function(const char *s);
+ void set_gnu_static_function(const char *s);
+ void set_posix_include(const char *s);
+ void set_posix_conditional(const char *s);
+ void set_posix_file(const char *s);
+ void set_posix_set(const char *s);
};
} // namespace proj
@@ -91,4 +102,3 @@ public: // Methods
#endif // FLUID_PROJ_I18N_H
-