Call for Volunteers: Write GetListItemText for your Language/Culture
I have a goal that the HtmlConverter.cs module in Open-Xml-PowerTools be the highest fidelity conversion of DOCX to HTML/CSS possible. One key activity is to implement a method, GetListItemText, for each appropriate language. When you have a numbered list in Open XML, there are three forms of numbering that need to be localized: Cardinal Text, Ordinal Text, and Ordinal.
For example, the following list shows ‘cardinal text’ numbering of a list:
One. |
This is the first item in the list. |
Two. |
This is the second item in the list. |
Three. |
This is the third item in the list. |
The following shows ‘ordinal text’ numbering of a list:
First. |
This is the first item in the list. |
Second. |
This is the second item in the list. |
Third. |
This is the third item in the list. |
A simpler form of ‘ordinal text’ is ‘ordinal’ numbering of a list:
1st. |
This is the first item in the list. |
2nd. |
This is the second item in the list. |
3rd. |
This is the third item in the list. |
These three methods need to be different for each language. For example, if these lists were in French, they would look like:
Un. |
This is the first item in the list. |
Deux. |
This is the second item in the list. |
Trois. |
This is the third item in the list. |
|
|
Premier. |
This is the first item in the list. |
Deuxième. |
This is the second item in the list. |
Troisième. |
This is the third item in the list. |
|
|
1er. |
This is the first item in the list. |
2e. |
This is the second item in the list. |
3e. |
This is the third item in the list. |
I have factored HtmlConverter.cs so that you can write an implementation of GetListItemText for your language and culture without touching the PowerTools for Open XML source code, and I am calling for volunteers to write an implementation for each language. The code to write an implementation is not very difficult provided you know the language. I will track which languages have a volunteer at the bottom of this page.
To see how to get started, view the following video:
Note that for some languages, specifically Asian and Right-To-Left languages, the implementation of HtmlConverter.cs is not yet complete. This is my highest priority project, and I plan to have an enhanced HtmlConverter.cs that supports Asian and RTL languages in the near future. But please don’t let this stop you from volunteering. The current implementation of HtmlConverter.cs will work well enough to build an implementation of GetListItemText for your language, and by the time you finish your implementation of GetListItemText, I will be releasing the enhanced version of HtmlConverter.cs. If your language has not been spoken for, please send an email to me (eric at ericwhite.com). You can also contact me through the OpenXMLDeveloper.org web site, or at the powertools.codeplex.com website.
Here are the languages supported by Microsoft Office:
Arabic |
|
Brazilian Portuguese |
|
Bulgarian |
|
Croatian |
|
Chinese (Simplified) |
|
Chinese (Traditional) |
|
Czech |
|
Danish |
|
Dutch |
|
English |
Eric White |
Estonian |
|
Finnish |
|
French |
Eric White |
German |
|
Greek |
|
Hebrew |
|
Hindi |
|
Hungarian |
|
Indonesian |
|
Italian |
|
Japanese |
|
Kazakh |
|
Korean |
|
Latvian |
|
Lithuanian |
|
Malaysian |
|
Norwegian |
|
Polish |
|
Portuguese |
|
Romanian |
|
Russian |
Oleg Rimko |
Serbian Latin |
|
Slovak |
|
Slovenian |
|
Spanish |
Jim Thatcher |
Swedish |
David Berglund |
Thai |
|
Turkish |
Ayberk CAL |
Ukrainian |
|
Vietnamese |
|