Info.plist - CameraUsageDescription a.o.

More
6 years 1 month ago #2830 by tstrooba
Hi,

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.

Thx,
Tim

Please Log in or Create an account to join the conversation.

More
6 years 1 month ago #2832 by Frank
Hi,
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)
                LocalizationManager.UpdateSources();

            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);
                contents.Add($"\"{term}\"=\"{loco}\";");
            }

            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,
Frank

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

Please Log in or Create an account to join the conversation.

More
5 years 11 months ago #2955 by enghoff
To my experience, the usage descriptions need to go in localised InfoPlist.strings rather than Localizable.strings

Please Log in or Create an account to join the conversation.

More
5 years 11 months ago #2956 by Frank
Indeed,
I2 Localization already sets the app name in InfoPList, and will set there the other "common" strings.
The strings file example I gave in the previous post was for other strings used directly from the app.

I will try boosting the priority of that task and add it to the beta as soon as I finish these fixes I'm doing currently!

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

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago #4279 by Jimmy
bump!

hello,

I'm wondering if this is still the best way to do this?

cheers,
jimmy

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago - 2 years 11 months ago #4283 by ArturK
A friend of mine advised me to check collegepaperwriter.online . It is a famous writing service where you can get papers to free up your time.
Last edit: 2 years 11 months ago by ArturK.

Please Log in or Create an account to join the conversation.

Time to create page: 0.577 seconds
Template by JoomlaShine