Skip to content

Language Localization File Editing

David Sage edited this page Sep 30, 2025 · 21 revisions
Language Full Spanish UI - cropped

Localization Files Provide Alternative Language Interfaces

The Spanish User Interface (UI), shown above, was the first supported language localization file to be completed. Without a localization file, most of the UI - apart from the Prompt Translator, Wildcards and Status Updates - would remain in English. The language localization file is therefore an essential component in supporting alternate language use.

Unlike the Prompt Translator, a localization file reaches a much higher standard of translation, with the ideal that each word and phrase should exactly convey the meaning of each FooocusPlus function and description. This relies on the language skills and dedication of volunteer translators.

The Three Phases of Localization Development

For any given language, the degree of effort required is variable. These were examples at the time this article was first written:

  1. The Simplified Chinese localization file already exists in FooocusPlus but need updating for changes and expansions to the UI
  2. There are several localization files available for original Fooocus that were never used but could be expanded for FooocusPlus - German for example.
  3. And for Hindi and many other languages that are supported by Argos Translate, there currently there are no localization files at all

Regardless of which category a language falls into, the FooocusPlus developers will ensure that an up-to-date localization template is available for a language volunteer to work with. It is best to save this work file to UserDir/user_language where it will override the current master file, if any.

Language Localization File

A Look at a Localization File

The image above depicts a portion of en_master.json, the basic startup file for languages that currently do not have any localization files. The column on the left represents the keywords as they actually exist in the UI. The second column represents the translation. Note that all languages, including English, are actually translated from the keywords to the translation. And even in English, there are a few differences between the two. For example, Line 624 above shows that "Use Via API" is not translated because this feature is not available and is therefore made invisible.

IMPORTANT NOTE: When building or editing a localization file, always use the second column as the source for translation, not the original keywords in the first column!

Other characteristics to note

  1. Both the keyword and translated sections of each line are enclosed in double quotation marks, ""
  2. The keyword and translation columns are separated by a full colon :
  3. Apart from the last line of text, each line must end with a comma ,
  4. When quotations are included within text, they are preceded by a backslash \" In the example, \"Fooocus"\ illustrates this point.
  5. While different languages use different amounts of words to express meaning, the translation should be as concise as possible.
Language - Partial Translation

A Working Localization File

The attachment above could be an example of a localization file that someone is working on. The fact that some words appear in the translated language show that there are no errors in the localization file, it is working properly.

Language - Failed Localization

What to Do When Localization Fails

In contrast, this attachment is the result of a localization file with at least one error, typically a missing quotation mark or comma at the end of a line. If even just one error exists in the file it will revert to the raw untranslated UI, and so the "Type the main prompt here or paste parameters" message appears in the prompt box, instead of the extended message starting with "Type your prompt in the supported language or English".

The console window will show the line at fault:

[UI]初始化用户界面. Expecting ',' delimiter: line 18 column 22 (char 1328) model_type EPS UNet ADM Dimension 2816

Or use TaffyCarl's JSON Validator, attached here: json_validator.zip and shown below.

In this case the error was actually in the previous line: the portion of the line that was intended to be translated was completely missing. Note that both the console window and the JSON Validator will only identify one error at a time.

JSON Validator

Clone this wiki locally