Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - nbrew

Pages: [1]
1
I realize this may be thread > 60 days old but I thought I'd propose a hack for anyone else who stumbles on this issue. As both vallcrist and Ernest indicated, when an actual newline character is present in a localization value the first character of the value will not be present in the game.

Example Localization.txt:

  1. KEY,English,Spanish
  2. name,"Common Name
  3. Latin Name","ES Translation Missing
  4. Latin Name"
  5. anotherKey,"Some Value","ES Translation Missing"
  6.  

Using "name" in English yields "ommon Name
Latin Name".

To remedy this you have two choices:
The first is to use the localizations as intended by replacing the newline character with "\n", so that the name line becomes
  1. name,"Common Name\nLatin Name","ES Translation Missing\nLatin Name"

The other option is to modify NGUI/Scripts/Internal/ByteReader.cs by commenting out line 220:

  1.                 while (canRead)
  2.                 {
  3.                         if (insideQuotes)
  4.                         {
  5.                                 string s = ReadLine(false);
  6.                                 if (s == null) return null;
  7.                                 s = s.Replace("\\n", "\n");
  8.                                 line += "\n" + s;
  9. //                              ++wordStart; // comment out this line
  10.                         }

I'm not completely sure of what other solutions this might impact but it seems to work for my localizations csv so far.

Hope this helps someone in the future.

Pages: [1]