Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Jan 16, 2015 at 11:53 AM by meat5000 for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by devilkkw · Oct 08, 2011 at 08:00 PM · languagelocalization

adding localization

Hi, i've try to find it in documentation,but not found. What is correct way to add localization in game?

is possible use plain text or xml file to struct language words?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

  • Sort: 
avatar image
0
Best Answer

Answer by Mammoth · Oct 08, 2011 at 11:42 PM

There no native support for it. But it's not really a problem (flash has it, but it is too bad). Sure you can use plain text or xml (see TextAsset).

I'll tell you how it's done if there are separate game versions, one for each language. Store all your textures and sounds that need localisation in a separate folder, so you can quickly change them. Create some text manager, that maps string keys to actual text. In a simple project keys can be just strings ("buttonPlay" -> "PLAY"). For something more complex it's convinient to have "groups", i.e. group "main_menu", key "button_play", text "PLAY".

You'll need to think about dynamically generated strings i.e. "task progress: 2 out of 4 done". In some languages the order of 2 and 4 MUST be reversed, so it's better to have option to parse strings like "task progress: [2] out of [3] done" in a way like

 string taskStr = Loc.GetStr("gamePanel", "task_desc");//that is "task '[1]' progress: [2] out of [3] done"
 string parsed = Loc.Parse(taskStr, 2, 4);//"task progress: 2 out of 4 done"
Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image devilkkw · Oct 09, 2011 at 02:13 AM 0
Share

Thank's,i've read TextAsset,but not understanding how to use. in documentation i've example only for TextAsset.bytes... Can add example for xml format? Is possible to use a table like xls or csv? my idea is addind text_default at frist colum the use other column to language translation. i haven't idea how to struct file contain definition word.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

iphone Language 1 Answer

What is the preferred practice when building for three languages? 1 Answer

Different app name for different languages (Android). 2 Answers

Unity Documentation in Spanish? 4 Answers

How to localization app name on android platform 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges