Search Unity

Question Localization display in IOS not work

Discussion in 'Localization Tools' started by ProGameDevUser, Dec 17, 2022.

  1. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    Hello everyone I did everything as it is indicated in the documentation for this package, but when assembling the .ipa file from XCode and then installing it on an iPhone, the application name remains the default, what could be the matter? I was also updating Addressable and it seems to me that I still forgot something
     

    Attached Files:

    • 1555.png
      1555.png
      File size:
      71.2 KB
      Views:
      168
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Could you also try adding a Short Name value?
     
  3. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    Wow, that's the speed of the response, thank you! Yes, of course) Can you please tell me I'm doing everything right? To localize the application name, I just need to register it in that place and do not need to do any manipulations with Unity and XCode to work?
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Settings those values is all you need to do. Then when you build it will set the project files up for you.
     
    ProGameDevUser likes this.
  5. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    OK, I added short name and will be doing the build soon, I will unsubscribe soon, thank you!
     
    karl_jones likes this.
  6. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    Alas, the customer wrote that the application remains in standard English :(
     
  7. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Have you tested using the iOS simulator? Does it do the same for you?
     
  8. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    unfortunately, I do not have iOS devices and I compile using VMware, then I give the build .ipa to the customer and he puts it through windows and iTunes using a wire to his iPhone, this is the sequence) Not use XCode for test
     
  9. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Does the game get built using xcode? The xcode project needs to be generated for the app name localization to work. What language is the user testing with? Are they setting the device language or the app language?
     
  10. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    Yes, XCode is used for the assembly, no for subsequent testing, the user is testing in Russian, is it possible to somehow look through the XCode files for the problem? Should something change in info.plist?
     
  11. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    There should be a Russian info.plist file.
    If the users opens the app options on the iOS device, there should be a list of supported languages.
     
    ProGameDevUser likes this.
  12. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    In the XCode build I see an English file, but there is no Russian there, what should I do and how to add it?
     
  13. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    There should be files in the xcode project, such as ru/info.plist.
    This will contain the values for each language.
    Are you using 1.4.2 of the package?
     
  14. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    Now, after a new build, I came across such an error after a successful build, maybe it's because of it
     

    Attached Files:

    • 151.png
      151.png
      File size:
      179.9 KB
      Views:
      110
  15. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    I am using 1.3.2, it is the maximum on my version, apparently
     

    Attached Files:

    • 1414.png
      1414.png
      File size:
      144.9 KB
      Views:
      92
  16. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    In XCode, only 1 language is visible, English, if it should be displayed here, of course)
     

    Attached Files:

    • 155.png
      155.png
      File size:
      109.2 KB
      Views:
      105
  17. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
  18. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    This is the only file in the project that I found and it has a representation only in English
     

    Attached Files:

    • 177.png
      177.png
      File size:
      146.9 KB
      Views:
      97
    • 1777.png
      1777.png
      File size:
      139.2 KB
      Views:
      102
  19. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
  20. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    It looks like the script is not running. We would need to take a look. Does this reproduce with a new project? Can you please file a bug report?
     
    ProGameDevUser likes this.
  21. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    I tried to put debug logs into these build methods of this script, but all my changes disappeared, and I couldn't find the source files of the package on mac, even following the docks on the unity website
    ($HOME/Library/Unity/cache) it still didn't work to find that path, so I'll try to build on windows with installed debags, because it's easier to find files in appdata here
     
  22. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    I made the build and attached what the engine gave out during the build, just like the script itself, to which logs were added, only 1 worked, by the way, in the build on Windows, there is a mention of the code in Russian in the info.plist file, but the translation of the word itself is not there...
     

    Attached Files:

  23. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    That error is a bug we currently have, it will explain why it's not working. We will have a fix in the next release.
     
    ProGameDevUser likes this.
  24. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    Thank you very much! Is there any way I can fix it now? At least a crutch is Just a deadline soon and I would like to complete this project :D
     
  25. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Copy the package folder from the package cache folder into the projects Packages folder.
    Then modify the file Packages/com.unity.localization/Editor/Platform/iOS/PBXProjectExtensions.cs

    Change line 95 so it is

    Code (csharp):
    1. s_PBXBuildFileDataCreateFromFile = s_PBXBuildFileDat.GetMethod("CreateFromFile", BindingFlags.Static | BindingFlags.Public, null, new Type[] { typeof(string), typeof(bool), typeof(string) }, null);
    It should now work.
     
    ProGameDevUser likes this.
  26. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    Thank you so much, Carl! The error has really disappeared! :))) And here I would like to understand one more thing, I made a project and I have files for XCode, in the info.plist file I should see the localized names that I registered in the project? Just entering the names, even by searching for the contents of the files, I can't find these options, but I admit that they may be "encrypted" somewhere, two lines en and ru also appeared in the info.plist file, but I didn't find the names of the application there
     
  27. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    There should be a file per language. Does it now work when run on iOS?
     
    ProGameDevUser likes this.
  28. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    Thank you very much!!! Everything works fine! =)))
     
    karl_jones likes this.
  29. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    By the way, localization is working successfully, but in XCode the application name is not filled in by default and Apple returned the application for corrections, I guess you just need to fill in an empty line of the application name that is automatically erased, only I didn't understand it does the localization package or something else)
     

    Attached Files:

    • 4115.png
      4115.png
      File size:
      14.8 KB
      Views:
      103
    elaine_unity694 likes this.
  30. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Yes you need to fill in the default. We have fixed this in the next release
     
    ProGameDevUser likes this.
  31. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    Super!
     
    karl_jones likes this.
  32. PJDubyaM

    PJDubyaM

    Joined:
    Jun 23, 2013
    Posts:
    1
    Just wanted to say thanks for this post. I hadn't been able to build and deploy to iPhone since installing the 2022.3 LTS, and it was an 'ambiguous reference' error pointing to the exact same line of code. I'm only a self-taught C# coder, and a lot of the lower-level more complex stuff is way beyond me, and so I didn't have a clue what was wrong, how to fix it, or why code written by people that weren't me should suddenly stop working. But, I followed the instructions in this post, and we're there. Thanks!
     
    ProGameDevUser and karl_jones like this.