gettext funcion applied to strings

This commit is contained in:
matiasbian
2018-05-29 19:56:28 -03:00
parent eaca6e1445
commit 560bb6cf8b
7 changed files with 25 additions and 13 deletions
+6
View File
@@ -3,6 +3,8 @@
#include "ai.h"
#include "engine.h"
#include "gfx.h"
#include <libintl.h>
#include <locale.h>
void draw_then_sleep(struct gfx_state *s, struct gamestate *g)
{
@@ -13,6 +15,10 @@ void draw_then_sleep(struct gfx_state *s, struct gamestate *g)
int main(int argc, char **argv)
{
setlocale (LC_ALL, "");
bindtextdomain ("gfx_terminal", "/usr/share/locale/");
textdomain ("gfx_terminal");
struct gamestate *g = gamestate_init(argc, argv);
if (!g) {
fatal("failed to allocate gamestate");