Skip to content
Snippets Groups Projects
Verified Commit d1cfddb1 authored by Benny Baumann's avatar Benny Baumann
Browse files

add: Actually use gettext

parent ce052fe7
No related branches found
No related tags found
No related merge requests found
#include <libintl.h>
#include <locale.h>
#include <iostream>
#include "ui/view.hpp"
#define _(str) gettext(str)
int main() {
using rmrf::ui::display;
setlocale(LC_ALL, NULL);
bindtextdomain("rmrf", "/usr/share/locale/");
textdomain("rmrf");
auto h_nc = std::make_shared<display>();
h_nc->sync([](const display::ptr_type &) {
std::cout << "Hello World!\n" << std::flush;
std::cout << _("Hello World!\n") << std::flush;
});
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment