MSGFILTER(1) User Commands MSGFILTER(1)

# [NAME](#NAME)

msgfilter - edit translations of message catalog

# [SYNOPSIS](#SYNOPSIS)

**msgfilter** \[*OPTION*] *FILTER* \[*FILTER-OPTION*]

# [DESCRIPTION](#DESCRIPTION)

Applies a filter to all translations of a translation catalog.

Mandatory arguments to long options are mandatory for short options too.

## [Input file location:](#Input_file_location:)

[**-i**, **--input**=*INPUTFILE*](#i)

input PO file

[**-D**, **--directory**=*DIRECTORY*](#D)

add DIRECTORY to list for input files search

If no input file is given or if it is -, standard input is read.

## [Output file location:](#Output_file_location:)

[**-o**, **--output-file**=*FILE*](#o)

write output to specified file

The results are written to standard output if no output file is specified or if it is -.

The FILTER can be any program that reads a translation from standard input and writes a modified translation to standard output.

## [Filter input and output:](#Filter_input_and_output:)

[**--newline**](#newline)

add a newline at the end of input and remove a newline from the end of output

## [Useful FILTER-OPTIONs when the FILTER is 'sed':](#Useful_FILTER-OPTIONs_when_the_FILTER_is_'sed':)

[**-e**, **--expression**=*SCRIPT*](#e)

add SCRIPT to the commands to be executed

[**-f**, **--file**=*SCRIPTFILE*](#f)

add the contents of SCRIPTFILE to the commands to be executed

[**-n**, **--quiet**, **--silent**](#n)

suppress automatic printing of pattern space

## [Input file syntax:](#Input_file_syntax:)

[**-P**, **--properties-input**](#P)

input file is in Java .properties syntax

[**--stringtable-input**](#stringtable)

input file is in NeXTstep/GNUstep .strings syntax

## [Output details:](#Output_details:)

[**--color**](#color)

use colors and other text attributes always

[**--color**=*WHEN*](#color~2)

use colors and other text attributes if WHEN. WHEN may be 'always', 'never', 'auto', or 'html'.

[**--style**=*STYLEFILE*](#style)

specify CSS style rule file for **--color**

[**--no-escape**](#no)

do not use C escapes in output (default)

[**-E**, **--escape**](#E)

use C escapes in output, no extended chars

[**--force-po**](#force)

write PO file even if empty

[**--indent**](#indent)

indented output style

[**--keep-header**](#keep)

keep header entry unmodified, don't filter it

[**--no-location**](#no~2)

suppress '#: filename:line' lines

[**-n**, **--add-location**](#n~2)

preserve '#: filename:line' lines (default)

[**--strict**](#strict)

strict Uniforum output style

[**-p**, **--properties-output**](#p)

write out a Java .properties file

[**--stringtable-output**](#stringtable~2)

write out a NeXTstep/GNUstep .strings file

[**-w**, **--width**=*NUMBER*](#w)

set output page width

[**--no-wrap**](#no~3)

do not break long message lines, longer than the output page width, into several lines

[**-s**, **--sort-output**](#s)

generate sorted output

[**-F**, **--sort-by-file**](#F)

sort output by file location

## [Informative output:](#Informative_output:)

[**-h**, **--help**](#h)

display this help and exit

[**-V**, **--version**](#V)

output version information and exit

# [AUTHOR](#AUTHOR)

Written by Bruno Haible.

# [REPORTING BUGS](#REPORTING_BUGS)

Report bugs in the bug tracker at &lt;https://savannah.gnu.org/projects/gettext&gt; or by email to &lt;bug-gettext@gnu.org&gt;.

# [COPYRIGHT](#COPYRIGHT)

Copyright © 2001-2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later &lt;https://gnu.org/licenses/gpl.html&gt;  
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

# [SEE ALSO](#SEE_ALSO)

The full documentation for **msgfilter** is maintained as a Texinfo manual. If the **info** and **msgfilter** programs are properly installed at your site, the command

**info msgfilter**

should give you access to the complete manual.

October 2026 GNU gettext-tools 1.0

---

Document: msgfilter(1) from gettext 1.0-r8 (Chainguard OS)
Source: https://git.savannah.gnu.org/git/gettext.git
