Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Chinese translation or any other language #852

Open
wcxu21 opened this issue Sep 6, 2021 · 3 comments
Open

Add Chinese translation or any other language #852

wcxu21 opened this issue Sep 6, 2021 · 3 comments
Labels
group: code Implementation item: source Code file prio: low Not urgent nor important state: delayed Deferred type: improve Extend feature

Comments

@wcxu21
Copy link

wcxu21 commented Sep 6, 2021

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. :-)

@Ordisoftware
Copy link
Owner

Ordisoftware commented Sep 6, 2021

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

@Ordisoftware Ordisoftware changed the title Can you add multilingual translation? Add Chinese translation Sep 6, 2021
@Ordisoftware Ordisoftware added group: code Implementation item: source Code file state: delayed Deferred type: improve Extend feature labels Sep 6, 2021
@wcxu21
Copy link
Author

wcxu21 commented Sep 7, 2021

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.

@Ordisoftware
Copy link
Owner

Ordisoftware commented Sep 7, 2021

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.

@Ordisoftware Ordisoftware changed the title Add Chinese translation Add Chinese translation or any other language Sep 7, 2021
@Ordisoftware Ordisoftware reopened this Sep 21, 2022
@Ordisoftware Ordisoftware added the prio: low Not urgent nor important label Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group: code Implementation item: source Code file prio: low Not urgent nor important state: delayed Deferred type: improve Extend feature
Projects
None yet
Development

No branches or pull requests

2 participants