Localization Support #31
Replies: 6 comments 3 replies
-
Thanks for this new option Is this master (english) language? https://github.com/radj307/volume-control/blob/main/VolumeControl/Localization/en.loc.json The language file xx.loc,.json (wher xx is teh country id - ex it for Italy) should posted in this folder? https://github.com/radj307/volume-control/tree/main/VolumeControl/Localization About language name that the user can select whtdo you think to use Local name language and after the English name..Ex "Italiano (Italian)" |
Beta Was this translation helpful? Give feedback.
-
How can set by default to serach .json language file in the same flder where I run Volume Control (to amke it portable)? |
Beta Was this translation helpful? Give feedback.
This comment has been minimized.
This comment has been minimized.
-
I already tried but with default .json config file when I run Volume Control exe with it.loc.json in the same folder teh program didn't detect italian language. |
Beta Was this translation helpful? Give feedback.
-
It's true. "CustomLocalizationDirectories": [], it didn't work. "CustomLocalizationDirectories": ["."], Thanks. |
Beta Was this translation helpful? Give feedback.
-
Ok. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Localization Support (#30)
With the release of v5.2.1, support has been added for UI localization using JSON or YAML language config files.
You can change the UI language at runtime with the Language dropdown, which can be found in the Settings tab.
Note that Process & Device names will always appear as they do in Windows, regardless of the localization settings in the Volume Control app.
You can also change the selected language by editing
LanguageName
inVolumeControl.json
:Language Configs
A language config is formatted in JSON or YAML, and contains some or all of the strings used by the various parts of the UI.
The structure of these configs is based on the structure of the underlying XAML used by WPF, and is of critical importance; all of the names of the keys must match the translation paths used by the UI.
The language name is used as the key name in language configs, where the value is the translated string.
Format
All language configs start with a
LanguageName
definition:These are used to identify the language name, and must be consistent throughout the entire document.
Multiple languages may be defined in the same document, so long as they have different (key) names:
The rest of the document is composed of objects that represent UI elements.
Each object may contain translation strings or subobjects; but never both. Since there is no way to distinguish between a translation string object and a parent object, it is highly recommended that you use the default language config as a base.
Objects that do not have any child objects can be assumed to be translation string objects.
Locations
The default location for language configs is
C:\Users\<USERNAME>\AppData\Local\radj307\Localization
, additional directories may also be specified using theCustomLocalizationDirectories
setting inVolumeControl.json
.VolumeControl.json
There are also some new language settings that can be found in the
VolumeControl.json
config file:LanguageName
specifies the name of the currently-selected language.CreateDefaultTranslationFiles
will create the default language configs in the default location when they're missing when set totrue
.CustomLocalizationDirectories
is an array of directory paths that language configs will also be loaded from.Note that language configs in subdirectories are not loaded!
If you have questions or concerns, post them as a reply to this discussion thread.
Beta Was this translation helpful? Give feedback.
All reactions