Language in Application menu

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jmk_phd
Posts: 213
Joined: Sat Apr 15, 2017 8:29 pm

Language in Application menu

Post by jmk_phd » Thu Jun 17, 2021 9:57 pm

Thanks to Matthias Rebbe's superb LiveCode lesson on code-signing -- plus a lot of trial-and-error -- I was finally able to sign/notarize/staple one of my apps, which downloaded without any scary GateKeeper warnings. Curiously, however, the items in the Application menu are in German, which is nice for any prospective German users, but not intended.

Matthias did instruct that, prior to signing/notarizing, several of the .lproj folders in the bundle had to be renamed using iso country codes -- why this hasn't been done already by the LiveCode folks is a mystery to me -- so I dutifully did so, following the iso codes supplied on Wikipedia.

My only guess is that this is the source of the problem -- specifically, changing the folder English.lproj to to uk.proj. (Being in the U.S., this seemed less presumptuous than renaming it us.proj.) In any case, why this then would default to German specifically is puzzling.

I assume that many on this forum routinely sign/notarize/staple apps for Mac distribution, so I assume that there's a very simple answer and solution.

Thanks!

jeff k

jmk_phd
Posts: 213
Joined: Sat Apr 15, 2017 8:29 pm

Re: Language in Application menu

Post by jmk_phd » Thu Jun 17, 2021 10:50 pm

Please pardon my typos. In all cases the language folders are .lproj.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Language in Application menu

Post by jacque » Fri Jun 18, 2021 4:26 pm

Check the plist file. I'm not at the computer right now but think the language is specified there.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Language in Application menu

Post by jmburnod » Fri Jun 18, 2021 4:45 pm

Hi jeff,
What Jacque said
LangageInpList.png
Best regards
Jean-Marc
https://alternatic.ch

jmk_phd
Posts: 213
Joined: Sat Apr 15, 2017 8:29 pm

Re: Language in Application menu

Post by jmk_phd » Sat Jun 19, 2021 12:32 am

Thanks Jacque and Jean-Marc for your replies.

I checked the Info.plist file found in the contents of my macOS standalone. (It opened by default as text in BBEdit, then -- given the clue from Jean-Marc's screenshot -- I copied the file to my desktop and opened it using XCode.)

In both the BBEdit text and the XCode window, the name of the key is a bit different than the one in Jean-Marc's screenshot -- namely, "CFBundleDevelopmentRegion" vs. "Localization native developm...".

But here's the issue: The corresponding string is -- just as in Jean-Marc's screenshot -- "English". (BTW, "Germany" is an option in the Value dropdown menu in XCode.)

So I'm still puzzled as to why the Application menu items display in German.

Searching these forums, I did find an old thread regarding Info.plist initiated by Jean-Marc, which specified that a modified Info.plist needed to be included in the Copy Files standalone settings prior to building, code-signing and notarizing. But if "English" already is specified, what's to modify?

Thanks!

jeff k

P.S. Is it possible that the English.lproj folder should've been changed to en.lproj, even though "en" is not listed as a valid iso country code on Wikipedia?

jmk_phd
Posts: 213
Joined: Sat Apr 15, 2017 8:29 pm

Re: Language in Application menu

Post by jmk_phd » Mon Jun 21, 2021 9:18 pm

In reply to a problem ticket submitted to LiveCode, Elanor asked me to experiment a bit. Here's what I've learned:

(1) When creating a new standalone from my stack, the Application menu displays correctly in English.

(2) When I rename the language folders in the standalone package following Matthias' instruction (in chapter 2.2 of his lesson) to change these to iso country codes, when I rename the "English.lproj" folder *either* to "uk.lproj" *or* to "us.lproj" the Application menu displays items incorrectly in German.

(3) However, when I change "English.lproj" to "en.lproj" -- despite "en" not being (according to Wikipedia) a valid iso country code -- the menu displays correctly in English.

(4) As a final check, I used XCode to change the localization in the "Info.plist" to "Germany" (after having renamed "Germany.lproj" to "de.lproj"). When doing so, the menu does (in this case properly) display the items in German.

So, bottom line, it appears that renaming "English.lproj" to "en.lproj" is an exception to the rule of renaming using iso country codes (although I've not yet confirmed that there are no other exceptions.)

I still do not understand why renaming the language folders is necessary in order to pass Apple's code-signing/notarizing system -- nor whether not doing so will cause signing/notarizing to fail -- but apparently this does resolve at least the menu problem with standalone prior to code-signing.

jeff k

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Language in Application menu

Post by jacque » Mon Jun 21, 2021 9:27 pm

I'm not sure why the renaming is required either, I've never done it. On the other hand, I use Matthias' tool to code sign Mac apps, which is not only very handy and quick, but may also do the modifications silently.

Given what you've found out, it seems that what's required is not a country code but rather an ISO 639 language code; "EN" is the standard code for English.
https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jmk_phd
Posts: 213
Joined: Sat Apr 15, 2017 8:29 pm

Re: Language in Application menu

Post by jmk_phd » Mon Jun 21, 2021 10:32 pm

Jacque --

Thanks for your reply. Your link to ISO 639 language codes make sense for English and most -- but not all -- other .lproj folder names.

Still, inasmuch as you've apparently code-signed/notarized Mac apps without having done Matthias' prescribed renaming of the language folders, I've got to wonder whether this is really necessary.

jeff k

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Language in Application menu

Post by jacque » Tue Jun 22, 2021 5:49 pm

I guess the easiest way to find out is to try a build without renaming. I'd be curious to know if it works.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jmk_phd
Posts: 213
Joined: Sat Apr 15, 2017 8:29 pm

Re: Language in Application menu

Post by jmk_phd » Tue Jun 22, 2021 11:32 pm

Jacque and all --

Elanor Buchanan of LiveCode confirmed your guess that what are required in renaming the .lproj folders are language codes and not country codes, and she reported that Matthias' code-signing lesson will be updated accordingly.

I'll probably do the renaming using the language codes on my next try at completing the code-signing process. If it works -- as I've confirmed it does when doing a build prior to code-signing -- I'm okay with taking on faith that the step of renaming the .lproj folders is just a bit of necessary voodoo.

jeff k

Post Reply

Return to “Mac OS”