diff --git a/src/interfaces/ecpg/ecpglib/extern.h b/src/interfaces/ecpg/ecpglib/extern.h
index b55229943a8e21d4876198ac71f9cda0b35b22f1..04c81116091689d691905d57a5c0c3eb32809d52 100644
--- a/src/interfaces/ecpg/ecpglib/extern.h
+++ b/src/interfaces/ecpg/ecpglib/extern.h
@@ -206,6 +206,12 @@ void		ecpg_set_compat_sqlda(int, struct sqlda_compat **, const PGresult *, int,
 struct sqlda_struct *ecpg_build_native_sqlda(int, PGresult *, int, enum COMPAT_MODE);
 void		ecpg_set_native_sqlda(int, struct sqlda_struct **, const PGresult *, int, enum COMPAT_MODE);
 
+#ifdef ENABLE_NLS
+extern char *ecpg_gettext(const char *msgid) pg_attribute_format_arg(1);
+#else
+#define ecpg_gettext(x) (x)
+#endif
+
 /* SQLSTATE values generated or processed by ecpglib (intentionally
  * not exported -- users should refer to the codes directly) */
 
diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h
index 8a601996d2d2b5ad528cc67ade42fc52dab93fed..a42745193032d4ce7ded7b151335f5361ba3b816 100644
--- a/src/interfaces/ecpg/include/ecpglib.h
+++ b/src/interfaces/ecpg/include/ecpglib.h
@@ -12,12 +12,6 @@
 #include "sqlca.h"
 #include <string.h>
 
-#ifdef ENABLE_NLS
-extern char *ecpg_gettext(const char *msgid) pg_attribute_format_arg(1);
-#else
-#define ecpg_gettext(x) (x)
-#endif
-
 #ifndef __cplusplus
 #ifndef bool
 #define bool char