---
name: "printf_l"
section: "3"
platform: "macos"
package: "Libc"
version: "1752.120.2"
release: "macOS 26.5"
platforms: ["freebsd", "macos"]
url: "https://new.carta.tech/printf_l"
---

# printf\_l(3)

formatted output conversion

## NAME

**asprintf\_l**, **dprintf\_l**, **fprintf\_l**, **printf\_l**, **snprintf\_l**, **sprintf\_l**, **vasprintf\_l**, **vdprintf\_l**, **vfprintf\_l**, **vprintf\_l**, **vsnprintf\_l**, **vsprintf\_l** – formatted output conversion

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

**#include \<stdio.h\>**

**#include \<xlocale.h\>**

*int*\

**asprintf\_l**(*char \*\*ret*, *locale\_t loc*, *const char \*format*, *...*);

*int*\

**dprintf\_l**(*int fd*, *locale\_t loc*, *const char \* restrict format*, *...*);

*int*\

**fprintf\_l**(*FILE \* restrict stream*, *locale\_t loc*, *const char \* restrict format*, *...*);

*int*\

**printf\_l**(*locale\_t loc*, *const char \* restrict format*, *...*);

*int*\

**snprintf\_l**(*char \* restrict str*, *size\_t size*, *locale\_t loc*, *const char \* restrict format*, *...*);

*int*\

**sprintf\_l**(*char \* restrict str*, *locale\_t loc*, *const char \* restrict format*, *...*);

**#include \<stdarg.h\>**

**#include \<xlocale.h\>**

*int*\

**vasprintf\_l**(*char \*\*ret*, *locale\_t loc*, *const char \*format*, *va\_list ap*);

*int*\

**vdprintf\_l**(*int fd*, *locale\_t loc*, *const char \* restrict format*, *va\_list ap*);

*int*\

**vfprintf\_l**(*FILE \* restrict stream*, *locale\_t loc*, *const char \* restrict format*, *va\_list ap*);

*int*\

**vprintf\_l**(*locale\_t loc*, *const char \* restrict format*, *va\_list ap*);

*int*\

**vsnprintf\_l**(*char \* restrict str*, *size\_t size*, *locale\_t loc*, *const char \* restrict format*, *va\_list ap*);

*int*\

**vsprintf\_l**(*char \* restrict str*, *locale\_t loc*, *const char \* restrict format*, *va\_list ap*);

## DESCRIPTION

The **printf\_l**(), **dprintf\_l**(), **fprintf\_l**(), **sprintf\_l**(), **snprintf\_l**(), **asprintf\_l**(), **vprintf\_l**(), **vdprintf\_l**(), **vfprintf\_l**(), **vsprintf\_l**(), **vsnprintf\_l**(), and **vasprintf\_l**() functions are extended locale versions of the **printf**(), **dprintf**(), **fprintf**(), **sprintf**(), **snprintf**(), **asprintf**(), **vprintf**(), **vdprintf**(), **vfprintf**(), **vsprintf**(), **vsnprintf**(), and **vasprintf**() functions, respectively. Refer to their manual pages for details. Also, see [xlocale(3)](/xlocale/3.md) for more information about extended locales.

## SEE ALSO

[printf(3)](/printf/3.md), [xlocale(3)](/xlocale/3.md)
