GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
* Sign Up! *

Support
Customer Portal
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
_(1) fish-shell _(1)

_ - call fish's translations

_ STRING

_ translates its arguments into the current language, if possible.

This only works with messages which are translated as part of fish's own sources, so using it as part of your own fish scripts which are not upstreamed into the fish repo will not work unless the exact same message also exists upstream.

It requires fish to be built with gettext support. If that support is disabled or there is no translation it will echo the argument back.

The language depends on the current locale, set with LANG, LC_MESSAGES, LC_ALL, and LANGUAGE. These variables do not have to be exported for fish to use them, and fish's variable scopes are supported. If other programs launched via fish should respect these locale variables they have to be exported to make them available outside of fish.

For LANGUAGE you can use a list, or use colons to separate multiple languages.

If the status language set command was used, its arguments specify the language precedence, and the environment variables are ignored.

_ takes no options.

Use German translations:

> set LANG de_DE.UTF-8
> _ file
Datei


Specify a precedence of languages (only works with LANGUAGE):

> set LANGUAGE pt de
> _ file  # This message has a Portuguese translation.
arquivo
> _ "Invalid arguments"  # This message does not have a Portuguese translation, but a German one.
Ungültige Argumente
> _ untranslatable  # No translation in Portuguese, nor in German.
untranslatable


Note that the specific examples may change if translations are added/modified.

fish-shell developers

June 13, 2026 4.3

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.