steff
Posts: 6
Joined: Tue Aug 19, 2008 8:30 am

Using files dependent of language

Hello support,
I am evaluating AI as a replacement for Installshield. I need to create installers containing several languages. I am looking for a way to assign files to the selected language. So when I select the Dutch language I need to install several folders, some of them are common (used for all other languages) and others only for the Dutch installation. In the same installer I want to use other languages too. I'm used to work with Installshield, and know how to do it in that program. It is possible in Installshield to assign the languages it should used in for every folder with files. I found no way of getting that same result in AI.

Is it possible in AI ?

Thanks for any respons...

Regards
Stefan Recker
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Using files dependent of language

Hi Stefan,

Thank you for your interest in Advanced Installer.

What you need can be done by using the ProductLanguage property to condition the components in the Organization page. Here you can find the values of ProductLanguage for some of the most used languages.

For example, here are the steps for settings some files to install only for a Dutch installation:
- go to the Organization page
- create a new feature and name it "Dutch"
- go to the Files and Folders page
- use the "Feature" combo on the toolbar to select the "Dutch" feature
- add the files which will be installed only for the Dutch package
- go to the "Organization" page
- for all components under the "Dutch" feature set the Condition field to this:

Code: Select all

ProductLanguage = 1043
This will make the components install only if the installation language is "Dutch". Note that you can set this condition for multiple components by following these steps:
- select the feature which contains the components
- press SHIFT+F4 on your keyboard
- in the "Search Result" pane select the components you want
- right-click one of the selected components and select the "Properties" menu
- set the condition you want

If you have other questions, don't hesitate to ask.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
steff
Posts: 6
Joined: Tue Aug 19, 2008 8:30 am

Re: Using files dependent of language

Hello support,
Thanks for the answer, that is clear.

I have another question. I need to make installers which include several languages, manually selectable. So a French user (on a French Windows) must be able to install a Bulgarian version of our program.
Sometimes I need to send out an installer with just one language, other times I need to include multiple languages. With languages I mean the languages of the dialogues and the language of our software(files).

It should be possible to select only one "set" of language dependent files at the same time. I can use the "feature action.vbs" which I downloaded, the mutually exclusive features option is exactly what I need for that.

The language dependent files have all the same structure, with often the same name of the files, just the content of the files is different. Example: "language1" needs to install "APPDIR/folder1/font1.dat", "APPDIR/folder2" and "APPDIR/folder3 ". When language 2 is selected, I need to install the same set of folders, "APPDIR/folder1/font1.dat", "APPDIR/folder2" and "APPDIR/folder3 ". The file "Font1.dat" is different in both languages. I already made different features for all the language dependent files.

When I try to add the files in the "Files and folders" section, it detects the files with the same name and refuses to add them, despite the fact that I assigned them to a different feature. So it seams that the assignment is based on file name only.

What can I do to solve this ? I really want (need) to have a single project to manage, not stand alone projects
DO you maybe have an example project for this?
Thanks
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Using files dependent of language

Hi,
I need to make installers which include several languages, manually selectable.
This can be done by using the "Display language selection dialog (for multi-language packages)" option in the Bootstrapper tab of the "Media" page. Note that this option affects only the installation package (the files in it are not affected).
It should be possible to select only one "set" of language dependent files at the same time.
We have on our TODO list an improvement which will address this scenario and it will be available in a future version.
When I try to add the files in the "Files and folders" section, it detects the files with the same name and refuses to add them, despite the fact that I assigned them to a different feature.
Advanced Installer does not support duplicate files in the same folder. Therefore, you can try this approach:
- in "Application Folder" add the files and folders of your default language
- under "Application Folder" create a subfolder for another language
- use the "Feature" combo on the toolbar to select the feature which corresponds to that language
- in the sub-folder add the files and folders of the other language, just like you would have added them in "Application Folder"
- double-click this subfolder
- in the Properties tab of the "Edit Folder" dialog check the "Install folder content into the parent folder" option

With this approach you should obtain multiple features (one for each language) which contain the files for each language. Since the features are mutually exclusive, only the files in one feature will be installed. Also, the "Install folder content into the parent folder" option will make the files and folders in the language subfolder install in "Application Folder".
DO you maybe have an example project for this?
Unfortunately we don't have a sample project for this. However, if you need one we will try to provide it.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
steff
Posts: 6
Joined: Tue Aug 19, 2008 8:30 am

Re: Using files dependent of language

Thanks Cosmin,
An example project would really help...

Regards
Steff
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Using files dependent of language

Hi,

I attached a sample project to this post. If you have any questions, don't hesitate to ask.

Regards,
Cosmin
Attachments
example.zip
(3.23 KiB) Downloaded 345 times
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”