Multi Language Text Manager is Library and Editor simplifies treatment of Multilingual Text for XNA.
A multilingual text can be created by GUI Editor, The created data is serialized by XML form.
With XNA, The serialized data can be read by Content.Load() Method.
Caution
Many of the texts of this site is using the automatic translation.
I have calibrated to some extent,
but there could be text on this site is incorrect.
May be slow to update than the Japanese version of the site.
Download
- [download id=”108″]
- [download id=”115″]
- [download id=”118″]
Explanation of GUI Editor
Main Window
- Menu Bar
- File Menu
- New
File is newly created. - Open
XML file is opened. - Save
The file under edit is overwritten. - Save As
A file name is specified and the data under edit is saved. - Quit
Quit GUI Editor.
- New
- Tool Menu
- Manage Language ID
Management window will be displayed on adding, editing, and deleting the Language ID. - Generate Character Table Text
The character list is output to a text file that is being used.
The text file is saved in UTF-8,
Characters are sorted by character code. - Character Table Text Option
Change the settings of Character Table Text Option.- Auto Generate When Save XML
If checked, generate the Character Table Text at the same time save character text XML file.
Once it is necessary to keep generate the Character Table Text performed manually. - File Save Mode
Specify the settings for the preservation of Save Character Table Text.- Add
Save merged with the specified file, the character that is currently being used.
If you use more than one XML, recommended this setting. - Overwrite
Only the characters that are currently in use will be stored.
- Add
- Auto Generate When Save XML
- Manage Language ID
- File Menu
- Text ID List
Click to select the item that you want to edit from this list.
↑, ↓ Swap the order of items in the selection and the click of a button. - Add Button
Register a new Text ID. - Remove Button
Remove the selected Text ID.
Remove all text associated with their ID will be deleted. - Text ID Input Area
Change the selected Text ID. - Lines
Can specify the height of the text box.
If one line, you can apply the changes in the Enter key.
If more than one line, line feed is performed in the Enter key. - Accept Change Button
To apply the information that has changed.
The changes are not reflected and you do not click this button.
While editing a single line, you can apply the changes by pressing the Enter key on the text input area. - Text Information Input Area
Enter the text that corresponds to each language.
Language ID Management Window
- Language ID List
Click to select the item that you want to edit from this list.
↑, ↓ Swap the order of items in the selection and the click of a button.
- Add Button
Regisret new Language ID.
- Remove Button
Delete the selected LanguageID.
Deleted all text associated with their ID will be deleted.
- ID Input Area
Change the selected Language ID.
- Explanation Input Area
Change the selected ID’s Explanation.
- Accept Change Button
To apply the information that has changed.
The changes are not reflected and you do not click this button.
You can apply the changes by pressing the Enter key on the text input area.
Sample Code
Using MultiLanguageTextData
[Crayon]
// Read XML( Asset Name : Text)
MultiLanguageTextData textData = Game.Content.Load
// Set Language ID
string lang = “en”;
// Get the Text( Language ID : en, Text ID : Menu_01 )
string text = textData.GetText( lang, “Menu_01” );
[/Crayon]
Using MultiLanguageTextManager
[Crayon]
// Create MultiLanguageTextManager
MultiLanguageTextManager textManager = new MultiLanguageTextManager();
// Set Language ID
string lang = “en”;
// Set Default Language ID
textManager.SetDefaultLanguageID( lang );
// Read XML( Asset Name : Menu, Game )
MultiLanguageTextData menuText = Game.Content.Load
MultiLanguageTextData gameText = Game.Content.Load
// Add XML Data to Manager( Category ID : Menu, Game )
textManager.AddContent( “Menu”, menuText ); // Set Default category to “Menu”
textManager.AddContent( “Game”, gameText ); // Default category does not change.
// Set Default Category
textManager.SetDefaultCategory( “Game” );
// Get the Text( Category ID : Game, Language ID : en, Text ID : ID_001 )
string text = textManager.GetText( “ID_001” );
[/Crayon]
How to add Reference
- Find and right-click Content Project from Solution Explorer.
- Find and click “Add Reference” from Right-Click Menu.
- Select “Reference” Tab,Find and Select “MultiLanguageTextManager.dll”.
How to use Character Table Text
Japanese has very many characters if a Chinese character is included.
If Font Texture corresponding to all the characters is generated, it will become huge too much.
Character Table Text is the text file which outputted only the character string inputted with the tool.
Font Texture only the character to be used can be created by WPF Font Processor and Character Table Text are made to cooperate.
Even if a text file is changed, you do not need to work manually.
Please refer to this site for WPF Font Processor.(Japanese Language Site)
- Add WPF Font Processor to Reference.
- Find and right-click spritefont file from Solution Explorer.
- Find and click “Property” from Right-Click Menu.
- Choose “WPF Font Processor”* to “Contents Processor”*.
- Open “Contents Processor”*, Input Chatacter Table Text file path to “Additional Character Text File Name”*.
* The actual menu item name cannot be checked. It may be different. I want you to look for the item of the similar name.
Details of Library Class and Method
Under Construction…
Method is added, modified, or deleted at any time if needed.
Requirement
XNA Framework 4.0 Required.
Windows XP, Windows Vista, Windows 7, Windows 8
Update History
- Ver 1.3.2.0 2012/08/22
- Specification changes
- Changed to save Text Box Lines.
- If I have not done even once save Character Table Text,
changed to display a confirmation message when saving XML
in “Auto Generate When Save XML” mode.
- Specification changes
- Ver 1.3.1.1 2012/08/18
- Bug fixes
- Fixed a bug that can not go back to single-line display mode after the transition to a multi-line edit mode once.
- Bug fixes
- Ver 1.3.1.0 2012/08/01
- Specification changes
- Changed the way the transition to a multi-line edit mode.
- Specification changes
- Ver 1.3.0.0 2012/07/26
- Additional functions
- Add the Overwrite mode to Character text used to generate the table.
- Can read the files by dragging and dropping.
- Specification changes
- Changed the configuration of the Generate Character Table Text menu.
- Add the Character Table Text file path to the XML file.
XML that was generated in the past, I no longer read.
- Bug fixes
- Fixed a bug that removed text is saved in a file to remove the Text ID.
- Additional functions
- Ver 1.2.0.0 2012/07/24
- Additional functions
- Added a process Generate Character Table Text is automatically saved.
- Specification changes
- Changed not to output a line feed code to Character Table Text.
- Bug fixes
- Fixed a bug with crash when trying to register a Texd ID present.
Display an error message when Language ID is already registered. - Fixed a bug that can not be canceled when remove the ID.
- Fixed a bug that is recognized as a change even though I have not had to change the language ID.
- Fixed a bug with crash when trying to register a Texd ID present.
- Additional functions
- Ver 1.1.1.0 – 2012/07/20
- Specification changes
- Even when multi-line edit mode, while editing text ID isWas to allow the application of the change with the Enter key.
- Specification changes
- Ver 1.1.0.0 – 2012/07/13
- Additional functions
- Corresponding to the input of the multi-line text.Accordingly, add ReplaceNewLineCode() method to MultiLanguageTextManager and MuitlLanguageTextData.
- Add new Class “LanguageIDInformation”.
- Specification changes
- If you have made the state saved in the input data has been changed, was to apply and save your changes.
- If the file path in the edit is longer than 30 characters, was omitted to be viewed.
- The method GetLanguageIDList() ‘s return value list acquisition language ID,Was changed to List<LanguageIDInformation> from Dictionary<string,string>.
- Data was changed to support multiple lines of sample data.
- Bug fixes
- Fixed a bug in the screen to kill language ID management when to remove all items.
- Additional functions
- Ver 1.0.1.0 – 2012/07/05
- Additional functions
- The menu bar of the editor, add the description of the shortcut.
- Add a method to MultiLanguageTextManager class, can obtain a list of ID and description language.
- Add a method to MultiLanguageTextManager class, Clear().
- Add a sample project.
- Specification changes
- Changed to output text string when you create a table using characters that are used to describe language and its ID.
- Was to issue a confirmation message when you try to close a window in the × button during editing.
- Additional functions
- Ver 1.0.0.1 – 2012/06/19
- Additional functions
- MuitlLanguageTextManager add a constructor of the class.
- Bug fixes
- When using MuitlLanguageTextManager, bug fixes may not be able to successfully retrieve a string.
- Additional functions
- Ver 1.0.0.0 – 2012/06/18
- First Release.
Disclaimer
This software is a β version under development.
The author is not responsible for any damages caused by using the software of this site.
The file may be the future, that you created in this version is no longer available.
Obligations and restrictions set forth is not licensed to use editor, of the library.
There is no problem to modify the XML data that is created in the editor, even if the de-serialized into its own class.