- 最后登录
- 2014-10-23
- 注册时间
- 2011-7-19
- 阅读权限
- 90
- 积分
- 81303
- 纳金币
- -1
- 精华
- 11
|
一个基本的思路,可惜是全英文的,应该是借助texture来进行多语言的实现吧。
Games created using the unity3d game engine can be easily localized, thanks to the great flexibility provided by their components system, but several choices must be made achieve it. Indeed, a decision must be made on how exactly to create and use localizable data within the game.
One approach, which I would call the “easy way” is to ensure that all the game text is only present in the game code. That way, before displaying any text string to the user, a localization table can used to translate the string into the user’s language. The main drawback of this method is that all the text is rendered programmatically, which will probably not give the flexibility of having the text manually integrated into textures by an artist.
The opposite idea would be to include all the texts inside textures such that they are rendered exactly as desired giving the best visual result. Localizing these assets thus requires translating the text directly into the textures and creating a system that chooses automatically the correct texture.
We developed an iPhone game using the Unity3D game engine that uses both of these strategies to display localized text to the users. Messages displayed dynamically and information display is rendered programmatically using the first approach. Story and GUI-related messages are directly included into textures to provide pertty visual integration of the localized content.
Implementing the first technique was easily achieved by using a csv file parser. We chose to use a csv file as our localization database since it is a simple and convenient format, which can be edited under tools like Microsoft Office or OpenOffice by our translation team. Using the in-code English text strings as our database key, we then simply use a translation method before displaying a string in the game. In our case, this function can be summarized by the following code:
由 u8 发表
|
|