5

I want to internationalize my gtk+2 app. I can do it if i've strings in source code(_("String")). I extracted all strings from .ui file using the xgettext. It's OK. I translated it. I want to set text domain for my interface file using:

gtk_builder_set_translation_domain(builder, GETTEXTPATH)

It doesn't works. All strings are same as at the beginning. I'm using GTK+ 2.24.10. I don't want to get all strings in program and use _().

wallyk
  • 56,922
  • 16
  • 83
  • 148
poxip
  • 909
  • 8
  • 25
  • Are you calling `gtk_builder_set_translation_domain()` **before** `gtk_builder_add_from_file()`? – ntd Apr 29 '13 at 08:25
  • If I call 'gtk_builder_set_translation_domain()' before 'gtk_builder_add_from_file()' It doesn't works, if i call it after 'gtk_builder_add_from_file()' is as previously :/ – poxip Apr 29 '13 at 12:52
  • 2
    Saying "it does not work" is quite unhelpful: (1) `gtk_builder_set_translation_domain()` must be called before loading the file, this is not an option (otherwise the GUI will be not translated, that is you'll get what you get); (2) you can use the `error` argument of `gtk_builder_add_from_file()` to inspect the eventual error you get; (3) `GETTEXTPATH` stinks: it is expected a domain name, not a path. – ntd Apr 29 '13 at 14:11

0 Answers0