Re: How to localize distribution package's requirements message
Re: How to localize distribution package's requirements message
- Subject: Re: How to localize distribution package's requirements message
- From: Ben Staveley-Taylor <email@hidden>
- Date: Wed, 9 Sep 2009 11:29:12 +0100
Thanks for the answer. I'm very happy to create a Localizable.strings
file if this is what it takes, but I can't get it to work. All I get
are the string keys ("MY_KEY_TITLE" etc) appearing in the alert.
After building my installer I have this package structure within it:
MyInstaller.mpkg
Contents
distribution.dist
Packages
MyPackage.pkg
Resources
en.lproj
background.psd
Localizable.strings
fr.lproj
background.psd
Localizable.strings
(... etc for other languages)
I used en/fr.lproj instead of English/French.lproj because that was
already there in the package from adding my other localized files via
the GUI. However, I have tried using English/French.lproj instead, but
no difference. My localizable.string files are UTF-16.
Have I misunderstood the mechanism?
Thanks.
-- Ben.
On 8 Sep 2009, at 23:58, Iceberg-Dev wrote:
On Sep 8, 2009, at 6:15 PM, Ben Staveley-Taylor wrote:
Does anyone know how to provide localizations for the messages
displayed by the Requirements elements of a distribution package?
(This is using PackageMaker.)
I am adding a requirement, if Result of Script then <Failure
Message>, and I can't see any way to enter text other than in
English.
I have created localized Resource folders in the package using the
Edit Interface button, but I don't think that's relevant.
After building the .mpkg, it contains this in the distribution.dist
file:
<script>function pm_install_check() {
if(!(system.run('<My script path here>') == true)) {
my.result.title = '<my English message title here>';
my.result.message = '<my English message text here>';
my.result.type = 'Fatal';
return false;
}
return true;
}
</script>
so there doesn't appear to be any language parameter being used.
For the record, you can't do this from PackageMaker. You will need
to edit the built package.
One solution is to use keys for the title and message and then
provide standard Localizable.strings file for each localization.
my.result.title = 'MY_KEY_TITLE';
my.result.message = 'MY_KEY_MESSAGE';
English.lproj > Localizable.strings
"MY_KEY_TITLE" = "This is my title in English";
"MY_KEY_MESSAGE" = "This is my message in English";
French.lproj > Localizable.strings
"MY_KEY_TITLE" = "Ceci est mon titre en Français";
"MY_KEY_MESSAGE" = "Ceci est mon message en Français";
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden