iOS Question #PlistExtra-Description in different language?

Filippo

Expert
Licensed User
Hi,

is there a way to show the description of "#PlistExtra" in different language?
For example:
B4X:
    Select CurrentLanguage
        Case "de_"
    #PlistExtra:<key>NSCameraUsageDescription</key><string>Aufnehmen eines Fotos.</string>                               
        Case "it_"
    #PlistExtra:<key>NSCameraUsageDescription</key><string>Fare una foto.</string>                                               
        Case Else
    #PlistExtra:<key>NSCameraUsageDescription</key><string>Taking a photo.</string>                               
    End Select
 

Filippo

Expert
Licensed User
Upvote 0

Filippo

Expert
Licensed User
Hi Erel,
unfortunately I get this error; Do you know what it is?
Error: ** BUILD FAILED **


The following build commands failed:
CopyStringsFile Payload/StopWatch4all-Pro.app/it.lproj/InfoPlist.strings it.lproj/InfoPlist.strings
CopyStringsFile Payload/StopWatch4all-Pro.app/it.lproj/InfoPlist.strings it.lproj/InfoPlist.strings
(2 failures)

upload_2018-11-11_14-5-14.png


InfoPlist.strings:
"NSCameraUsageDescription" = "La foto può essere utilizzata, ad esempio negli eventi di gara, come prova.";
 
Upvote 0

Filippo

Expert
Licensed User
Problem solved! The files must be saved in UTF-8 format.

Other question, if it is possible.
What is it like if a language does not exist? Can the English always be displayed (see my example above)?
 
Upvote 0

Filippo

Expert
Licensed User
One of the available languages will be selected. Probably English.
Unfortunately it is not like that; the system simply uses the first available language.
You can also create a file as "Base.lproj", but it is not taken by the system.
 
Upvote 0
Top