# info > msginit

---
type: CommandReference
command: msginit
mode: info
section: 6.1
source: info
---

## Quick Reference

- `msginit -i file.pot -l fr_FR.UTF-8` — Create a French PO file from a POT file.
- `msginit --input=file.pot --locale=de_DE` — Create a German PO file.
- `msginit --no-translator` — Create PO file marked as automatically generated.
- `msginit -o output.po` — Write output to a specific file.
- `msginit -p` — Write output in Java `.properties` syntax.
- `msginit --stringtable-output` — Write output in NeXTstep/GNUstep `.strings` syntax.
- `msginit --color=always` — Enable colorized output.
- `msginit -h` — Display help and exit.

## Name

`msginit` — Create a new PO file, initializing meta information from the user’s environment.

## Synopsis

shell
msginit [OPTION]
## Options

### Input file location

- `-i INPUTFILE, --input=INPUTFILE` — Input POT file. If not given, search current directory for a POT file. If `-`, read standard input.

### Output file location

- `-o FILE, --output-file=FILE` — Write output to the specified PO file. If not given, derive from `--locale` or the user’s locale setting. If `-`, write to standard output.

### Input file syntax

- `-P, --properties-input` — Assume input is a Java ResourceBundle in `.properties` syntax, not PO.
- `--stringtable-input` — Assume input is a NeXTstep/GNUstep localized resource file in `.strings` syntax, not PO.

### Output details

- `-l LL_CC[.ENCODING], --locale=LL_CC[.ENCODING]` — Set target locale. `LL` is language code, `CC` is country code. Optional `.ENCODING` (often `.UTF-8`). Default is the user’s locale setting. Use `locale -a` to list installed locales.
- `--no-translator` — Declare that the PO file is automatically generated (no human translator).
- `--color, --color=WHEN` — Specify whether or when to use colors and text attributes.
- `--style=STYLE_FILE` — Specify CSS style rule file for `--color`.
- `-p, --properties-output` — Write output in Java `.properties` syntax. Note: does not support plural forms; silently drops obsolete messages.
- `--stringtable-output` — Write output in NeXTstep/GNUstep `.strings` syntax. Note: does not support plural forms.
- `-w NUMBER, --width=NUMBER` — Set output page width. Long strings are split into multiple lines to keep each line ≤ NUMBER columns.
- `--no-wrap` — Do not break long message lines (except file reference lines that exceed the page width).

### Informative output

- `-h, --help` — Display help and exit.
- `-V, --version` — Output version information and exit.

## Examples

shell
# Create a French PO file from a POT file
msginit -i myfile.pot -l fr_FR.UTF-8

# Create a German PO file with explicit output
msginit --input=myfile.pot --locale=de_DE -o de.po

# Create a PO file for automated translation
msginit -i myfile.pot --no-translator

# Write output in Java .properties format
msginit -i myfile.pot -p -o Messages_fr.properties
## See Also

- `locale -a` — List all installed locales
- Unicode CLDR data (via `GETTEXTCLDRDIR` environment variable)