LoginSignup
0
0

More than 5 years have passed since last update.

c言語 > N_マクロ > gettextのマクロ

Last updated at Posted at 2015-05-31

https://github.com/neovim/neovim/commit/53774af5e94f437135e4664949d65ccf3be030e0
にて

static const char *err_arg_missing = N_("Argument missing after");

という記載がある。N_はgettextのマクロらしい。

http://www1.kokusaika.jp/advisory/org/ja/gettext.html
によると

メッセージの取り出しを関連ツールに指示する

という説明がある。

static const char *msg = N_("message");

というのはgettextでmsgid"message"に対応するmsgstrを取り出すための書き方らしい。

msgidやmsgstrは.poなり.potなりに用意するようだ。

gettextを使う利点は国際化対応で翻訳をする時に使うようだ。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0