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: Iceberg-Dev <email@hidden>
- Date: Wed, 9 Sep 2009 00:58:25 +0200
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