Exemplo n.º 1
0
// DCGettext is like Gettext(), but looks up the message in the specified
// domain and category.
func DCGettext(domain string, msgid string, category uint) string {
	cdomain := cDomainName(domain)
	defer C.free(unsafe.Pointer(cdomain))

	cmsgid := C.CString(msgid)
	defer C.free(unsafe.Pointer(cmsgid))

	return C.GoString(C.dcgettext(cdomain, cmsgid, C.int(category)))
}
Exemplo n.º 2
0
// Like Gettext(), but looking up the message in the specified domain and
// category.
func DCGettext(domain string, msgid string, category uint) string {
	cdomain := C.CString(domain)
	cmsgid := C.CString(msgid)

	res := C.GoString(C.dcgettext(cdomain, cmsgid, C.int(category)))

	C.free(unsafe.Pointer(cdomain))
	C.free(unsafe.Pointer(cmsgid))
	return res
}