Welcome, Guest
Username: Password: Remember me

TOPIC: Info.plist - CameraUsageDescription a.o.

Info.plist - CameraUsageDescription a.o. 1 week 16 minutes ago #2830

  • tstrooba
  • tstrooba's Avatar
  • Offline
  • New Member
  • Posts: 1
  • Karma: 0

Is there any way to localize camera usage description and other strings which are built into the Info.plist string on iOS?
They can be set from the player settings, but I could not find a way to localize them.

The administrator has disabled public write access.

Info.plist - CameraUsageDescription a.o. 6 days 9 hours ago #2832

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 986
  • Thank you received: 215
  • Karma: 64
One of my tasks for the release after this one (2.8.5) its to allow localizing all of the native messages.

In the meantime, you can "hack" this by:
1- create a term for each of the native texts you want to change
2- Make each of those terms be in an specific category (e.g. "NativeLocalization")
3- modify the file Assets\I2\Localization\Scripts\Editor\PostProcessBuild_IOS.cs
-Add this function to get all translations in that category
	public static List<string> GetNativeLocalizations(string code, string category="NativeLocalization")
            if (LocalizationManager.Sources.Count <= 0)

            var contents = new List<string>();
            var pushTerms = LocalizationManager.GetTermsList(category);
            var lang = LocalizationManager.GetLanguageFromCode(code, false);
            foreach (var pushTerm in pushTerms)
                var term = pushTerm.Replace(category+"/", "");
                var loco = LocalizationManager.GetTermTranslation(pushTerm, true, 0, true, false, null, lang);

            return contents;
-Instead of writing an empty file in line 85, write the result of that function
// File.WriteAllText(stringPaths, "");
File.WriteAllLines(stringPaths, GetNativeLocalizations(code));

Hope that helps,
Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The administrator has disabled public write access.
Time to create page: 0.086 seconds