Skip to main content

init

Function init 

Source
pub fn init(configured: Option<&str>)
Expand description

Choose the language for this process.

Resolution order, highest first:

  1. DEV_PRUNE_LANG, which governs one invocation and is what a script or a CI job sets when it wants a known language whatever the machine is configured for.
  2. the language setting, which is the durable answer for this user.
  3. English.

The operating system’s own locale is deliberately not consulted. A machine set to Hindi has said nothing about what language it wants its build tools in, and a user who has never asked for a translation should not be given a partial one by a variable they did not set.

Idempotent, and the first call wins — later calls are ignored, so a command that re-reads the registry cannot change the language halfway through its own output.