Open wcxu21 opened 2 years ago
Hi,
The software can be translated into any language, perhaps with some adaptations concerning the left-right direction.
I'm sorry but I don't have time to do such a thing yet and I really have no knowledge of Chinese language.
There is currently English and French.
The software actually uses string dictionaries in dedicated files, in hopes of possibly creating a language files system one day.
Normally there is no text outside of these files and .resx
.
Thus it is possible to fork the project or to create a branch to add a language and steps are below.
After that create a pull request.
Tell me if you can and want to do such a thing and how long it should take you using Visual Studio.
Best regards.
• Add it to the available languages list in Languages.cs
:
public enum Language
{
None,
EN,
FR,
ZH
}
• Open all winforms and select the new localization to be done in the property editor and change all Text properties of the controls.
• Edit any C# file having translation dictionaries to add it, like for example AppTranslations.cs
:
static public readonly TranslationsDictionary Subtitle
= new TranslationsDictionary
{
[Language.EN] = "LUNISOLAR CALENDAR",
[Language.FR] = "CALENDRIER LUNISOLAIRE"
[Language.ZH] = "阴阳历"
};
• Update all relevant files, here is a full list:
AppTranslations.BigCalendar.cs
AppTranslations.Calendar.cs
AppTranslations.cs
AppTranslations.Keys.cs
AppTranslations.News.cs
AppTranslations.Notices.cs
AppTranslations.Suspend.cs
BooksNames.Common.cs
CoolPrintPreviewDialog.cs
HebrewAlphabet.cs
HebrewTranslations.cs
PreferencesForm.cs
Program.cs
SysTranslations.Application.cs
SysTranslations.cs
SysTranslations.Database.cs
SysTranslations.Errors.cs
SysTranslations.IO.cs
SysTranslations.Processing.cs
SysTranslations.Settings.cs
SysTranslations.WebUpdate.cs
• Also update web links text files like WebLinks-01-Astronomy.txt
to add:
Lang/ZH = 天文学
These files do not support multilingual name tags yet, and the target site language is used for the title
thank you for your reply. It is recommended that you can make English sample language text files, so that it is convenient for other personnel to help translate the language, so that it can be internationally localized.
I'm sorry but I don't understand. The software is by default in English, and is also available in French. All C# WinForms are in English, with subsidiary localization in French according to the .NET .resx
system. All other texts that are not part of a form controls are grouped together in the SysTranslations
and AppTranslations
dictionaries with English as first key and French as second, the order does not matter. For the moment, there is no externalized language file in order to add one so that it is automatically recognized by the application binary file when executed. Such a thing is planned for a future if one day I have the time or if someone wants to put it in place. Otherwise for the moment, to add a language it suffices to add the two-letters language code enumeration in the source code, to translate each WinForm using the Visual Studio Form Designer and Property Editor, and to translate each dictionary key to add that of the enumeration in every listed code file. I really didn't have time to do this as well as many other things.
Hi, I am from China. Can you provide online translation for your application to increase multilingualism? For example: crowdin.com. I can help you translate Chinese language for free. :-)