Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: StridingDragon on May 06, 2013, 12:46:51 AM

Title: Handling second text file with Localization
Post by: StridingDragon on May 06, 2013, 12:46:51 AM
I want to separate the names and descriptions of items in my game into a separate text file to keep things a better organized and to make translation easier down the road. Having every bit of text in a game a single text file can easily become pretty unwieldy.

Is there a way to handle a second or even third text file in NGUI in the same language? I noticed that Localize is a singleton so simply making a duplicate object does not work, does it?
Title: Re: Handling second text file with Localization
Post by: ArenMook on May 06, 2013, 01:50:54 AM
No, Localization is designed to work with a single source. Nothing is stopping you from breaking up the file with empty lines and C++ style comments though.
Title: Re: Handling second text file with Localization
Post by: StridingDragon on May 17, 2013, 06:21:07 PM
Michael,

I've been writing my own version of Localization.cs and expanded it to accommodate a second text file. Additional text files can be added very easily.

If you're interested, I'd like to send you the source file so you could take a look and potentially work in the changes into your existing code base if you deem it appropriate. The idea of having tens or hundreds of thousands of text lines in a single text file just didn't sit too well with me. I think organization is key in any decent size project and to accommodate multiple text files definitely helps with that.

Just PM me and send me your email address and I'll be happy to send it over.
Title: Re: Handling second text file with Localization
Post by: ArenMook on May 18, 2013, 05:49:47 AM
support at tasharen.com