This commit is contained in:
lllyasviel 2023-10-20 07:44:56 -07:00
parent 9183cc0c71
commit 4a04d8b54a
2 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,7 @@ import fcbh.cli_args as fcbh_cli
fcbh_cli.parser.add_argument("--share", action='store_true', help="Set whether to share on Gradio.") fcbh_cli.parser.add_argument("--share", action='store_true', help="Set whether to share on Gradio.")
fcbh_cli.parser.add_argument("--preset", type=str, default=None, help="Apply specified UI preset.") fcbh_cli.parser.add_argument("--preset", type=str, default=None, help="Apply specified UI preset.")
fcbh_cli.parser.add_argument("--language", type=str, default=None, fcbh_cli.parser.add_argument("--language", type=str, default='default',
help="Translate UI using json files in [language] folder. " help="Translate UI using json files in [language] folder. "
"For example, [--language example] will use [language/example.json] for translation.") "For example, [--language example] will use [language/example.json] for translation.")

View File

@ -329,3 +329,5 @@ Or `run_realistic.bat` as
.\python_embeded\python.exe -s Fooocus\entry_with_update.py --language example --preset realistic .\python_embeded\python.exe -s Fooocus\entry_with_update.py --language example --preset realistic
For practical translation, you may create your own file like `Fooocus/language/jp.json` or `Fooocus/language/cn.json` and then use flag `--language jp` or `--language cn`. Apparently, these files do not exist now. **We need your help to create these files!** For practical translation, you may create your own file like `Fooocus/language/jp.json` or `Fooocus/language/cn.json` and then use flag `--language jp` or `--language cn`. Apparently, these files do not exist now. **We need your help to create these files!**
Note that if no `--language` is given and at the same time `Fooocus/language/default.json` exists, Fooocus will always load `Fooocus/language/default.json` for translation. By default, the file `Fooocus/language/default.json` does not exist.