Multilingual Support

jDownloads supports Multi-language Categories and Downloads. Setting up a new or converting an existing site to be a Joomla! multilingual site is now relatively straight forward .
If you have not already done that there is an excellent Joomla! article that takes you through the entire process of setting up a new multilingual site from scratch in a step by step manner.   
If you already have an existing sit that you need to convert to multilingual then there are additional notes in Appendix 2 below where some stages in the process  are outlined.  Additional assistance might be to create a simple multilingual site in a test environment to see what it looks like in the backend to act as a guide.

The purpose of this article is to note the jDownloads specifics and to illustrate the results.
It is assumed in this article that the Joomla! language translations are already installed.  So once that is done the next step is to install the relevant jDownload languages, but note jDownloads is distributed with English and German already installed.  Language packs for extensions are installed just like any other extension, they do not use the Install Language as that is only used for Joomla! languages.  Please see the Appendix on installing language packs for jDownloads.

In a multilingual site it is preferable that all content items, which includes jDownloads Categories and Downloads, should have a specific language set.  Setting the language of a content item to 'All' is however appropriate in some circumstances, a partcular example might be the Uncategorised caegory which is often used for Downloads awaiting allocation to another category.   In jDowloads the language options for Categories and Downloads are in entries Category Language and Download Language respectively.

There are some instances where text is set in the jDownloads backend so to make this language sensitive jDownloads supports the language 'plugins'
like {en-GB}some text{/en-GB}.  These are described further below in the section Other Text.

In principle if a site supports say three languages then there will be three sets of categories and three sets of Downloads.  This could also mean that there would be three sets of downloadable files which could be a significant space issue.

Note however that jDownloads supports Downloads where the downloadable file is actually in another Download.

Previously using this facility was only available in the Backend but with the 3.9 series it is also available in the Front End in the Files tab when editting or creating a new download as shown opposite.

The Users Groups Settings have been enhanced to allow 'Or from another Download' to be used in the front end.

See the article on User Groups Settings for more details [NEEDS REF]
other file01 other file02

Multi Language Associations
The key to a successful multilingual site are Associations.  When constructing such a site then each language has a 'language specific version' of each Category and each Download.  The key aspect of an Association is that it lets the system know items are 'joined' so that if you switch between languages then the relevant associated item is shown.

In this article a three language site with English, French and German items is used for demonstration examples because the author is acquainted with these languages!

Options - configuration
There are only two jDownloads Option settings relating to a multilingual setup.  These are in the Frontend tab and are illustrated opposite.
If 'Show Associations' is set to 'Yes', the associated flags or URL Language Code will  be displayed in the frontend.  The 'Use Image Flags' option also appears allowing choice of showing either the flags of associated items or the content language code.
Creating Associations
To demonstrate the use of Associations three top level categories, as illustrated opposite, were created in the backend. They are:
  1. 'Categories by Month' with an en-GB language setting;
  2. 'Kategorien nach Monat' with a de-DE language setting;
  3. 'Catégories par mois' with a fr-FR language setting.
associations 02

Clicking on the name of one of these,  say 'Categories by Month' for example, and then selecting the Associations tab shows the other languages.

associations 03

After clicking on the Select button for one of these languages, French say,  a list of available categories with that language setting will be shown.

Next click on the name of the category that is to be "associated" with the original category. 

associations 04

This will then go back to the Associations tab which now looks as shown on the right.
associations 04A
After repeating for all the languages then  click on Save & Close which returns to the list of categories. This shows that the associations have been set.

If you hover the mouse over an association it shows the name of the associated item.
associations 07
associations 06
Layout Place holder
The Download and Download Details Layouts allows have a placeholder {show_association} which generates a text such as shown opposite.  If, for example, you click on the German flag then the view switches to the equivalent German Download. layout01 layout02

Notes on Associating Downloads
Obviously Downloads in different languages will also need to be associated.   The general process is the same as outlined above for Categories.

It is useful here to first recall what makes up a Download.  A Download obviously has a title, an alias, permissions, access level, user access, a publication status, a language attribute and it is located in a category.  Optionally it may also have descriptions, symbols, images, previews, price, licence and many other items.  All of these are stored in the database.  Usually, but not always a Download includes a downloadable file. 

It is worth noting that the title of a Download and the name of the downloadable file are not the same item and, in principle, are not related; they could be totally different.

Actually a Download has two language related items.  One, which is the multilingual item, is called the 'Download Language'.  The other falls into the class of additional information and is called the 'Language for the downloadable file'.  This does not necessarily relate to anything multilingual but could refer, for example, to the programming language of the file.  It is the Download Language that is used with Associations.

Usually the structure of a Download is the same in each language.  The exact content will obviously change, most obviously the Title of the Download will be in a different language.  Items such as the symbol, the licence, the creator and so on will often be the same for all the associated Downloads.  Sometimes the only difference between a Download in one language and its aaociated Download in another language might be the title, alias and the description.

Clearly a Download will be created in one language initially.  To ensure that the corresponding Downloads in the other languages are similarly structured then using the Batch facility in the backend to make a copy of one or more Downloads is very useful.

Using the Batch facilty to create other language Downloads
The Batch facility may be used in three ways:
  1. to Move multiple Downloads from the present Category to another Category and set the language, access or tags of the moved Downloads ;
  2. to Copy multiple Downloads from the present Category to another Category and set the language, access or tags of the copied Downloads;
  3. to just set the language, access or tags of multiple Downloads
So having made one or more Downloads in one language then it is the Copy function that is most useful to get them copied over to the associated category. 
  1. When you COPY a Download only the Download is duplicated; no downloadable file is duplicated.
  2. If COPY is selected then any other selected actions are applied to the copied item but not to the original item.
  3. Preview Files and Images used in Downloads are held in a 'central' location with database entries indicating their location so those links are copied.

  There is also a Batch function in Categories  so if you have set up the initial top level multilingual specific categories and say a set of subcategories in one language then you can copy over all the sub categories from that language to another top level language category, changing the language setting in the copy process.  Generally this means just going to the 'new' subcategories and changing their names and alias to the the actual language.

From the Downloads screen in the backend select (tick) the Downloads that you wish to copy to another Category then click on the Batch button.

This will bring up the batch function window.  Set the required language and target category  and click Process.

In the example this was repeated for the German language
batch 10A
The example  Downloads were renamed to match the language and the Associations set up as described above for the categories.

Remember that the downloadable files themselves will not have been copied.

So if you look athe Downloads listing, such as the one shown opposite, then you will find that the 'copied ' Downloads have no downloadable file as indicated by the red symbol batch 16
batch 13

If you click on the name of one of the files and select the Files Data tab you may either select a new file or select a file from another Download.   This facility is available in the Front End as well as the Backend.

In this instance using a file from another Download was selected.  The Other Download selected was of course 'Existing Logos' as the downloadable file is just a pdf with a set of car logo images.
batch 14

After being selected and returning to the list of Downloads the result is shown opposite.

The file icon is now orange in colour to denote the downloadable file is in another Download.

Hovering the mouse over the orange symbol gives the Category and file name of the actual downloadable file.  Obviously this is repeated for the other language.
batch 15

Existing Sites
If you have an existing site which you need to convert to a multilingual site then after following the multilingual setup you will no doubt be left with many jD categories and Downloads that have the Language set to All.  With more than say a dozen entries, it would be extremely time consuming to go through each and every category and Download to change to what one might refer to as the 'original' language.

Using the Batch facilities simplifies the whole language changeover process.  The site can be up and running with an explanatory note about the changeover being carried out. The translations and adding downloadable files are readily carried out from the front end.

Other Text
There are various places in the Options where ancillary text may be used.  For example in Options - Front End tab there are setting for 'Component Description' and 'Footer Text'.  If you use AUP in the Specils tab then the message to the user would benefit from being made language sensitive.  Another possibility is making the email subject language sensitive in the E-Mail tab.

In User Groups Settings - Limits tab there are multiple places where making the message to the user language sensitive would be most useful.  Also in User Groups settings -Group Settings tab the Waiting Time Message would be better as language sensitive.

To make these items Language sensitive jDownloads supports language 'plugin' tags such as {en-GB}...{/en-GB}  for English. 

To determine the language tag for a language  go to Extension Manager -Language(s). This will show the list of installed languages and their language tag.
other text 02
As an example let us modify the  Component Description in Options- Front End tab so that it looks as shown opposite.  Note that the text may also contain HTML. other text 01

The result for each language is shown opposite
other text en01 other text de01 other text fr01

Appendix 1: Installing jDownloads Language packs
This is for users who wish to install and activate a language pack.
Using the Translation tab in the jDownloads Documentation & Tutorial Centre makes it very easy to add a language package to jDownloads.

Note It is essential that the normal Joomla! language package has already been installed first.

That is in this example the French language for Joomla! must be already installed.

No warning is given if it has not been installed.

The initial view after selecting the Translation tab allows you to select the required jD series

Clicking on the relevant button or title brings up a detailed view of the available languages. In this example we use the 3.2.x series.

Note that there is an automatically updated indicator for each language giving its percentage completion.
Install Lang01BB

For demonstration purposes this article shows how to install the jDownloads French language.

Obviously the procedure is the same for any language.

The view opposite shows the start of the article.

If you wish to download the language package for the currently selected language then scroll down to the foot of the page as shown opposite.

Then click on the 'Download Now' button.  This initiates the download.
You will be able to Save the file on your PC in a suitable folder. Install-Lang01E
The next step is to use the regular Extension Manager - Install as if you were installing any extension.

Do NOT use the Install Languages tab
Now browse for the file then Upload & Install

Note It is essential that the normal Joomla! language package has already been installed first
That is in this example the French language for Joomla! must already be installed. No warning is given if it has not been installed!
Typically you will then see a message such as opposite.  You now have the jDownloads Language installed.

Activating the language

In the next stage we use the Extensions - Language Manager as indicated immediately opposite.

This gives a view such as shown on the far side.  Basically select the desired language for the front end and make it the default.  The image below shows after making French the default.
Install Lang03 Install Lang04

You also need to repeat the process by selecting the Admin language.

Again the view opposite shows the result after making French the default Admin language.
Install Lang04A

Appendix 2: Notes on Nonverting an Existing Site to be Multilingual 

These notes are based on a response by nizz0k in StackExchange

The process will require a number of steps. It is much less tedious to plan a multi-language site from the beginning, than to implement another language later. I recommend getting translations for your content in advance. These are the steps I went through to get satisfactory results.

  1. Install the desired Joomla! languages through Extensions -> Languages.
  2. Configure and add your Content Languages in the Languages Menu.
  3. Enable the Language Filter Plugin. Optionally add and enable the Language Code module for better SEO.
  4. Create Language Content categories and recreate your existing categories for each language.
  5. Rebuild your menus. This is probably the most involved step because you will have to recreate your Main Menu in your "Main" language and then rebuild those menus for the additional language(s) you want to add. I found that using "Saves as a Copy" was really helpful in duplicating the pages. Remember to assign menu specific home pages and associating each page with its translation. To finalize the process you will have to add modules to each menu in the menu manager.
  6. Translate/Add/Remap your content. You will need translations of every piece of content you want to display. Then you need to add the content, label it with the appropriate language, and associate it with the "Main language" versions. This will include creating new Language categories and subcategories. I also had to save copies and re-label a number of my modules to maintain language consistency. This also meant applying translations to a number of Custom HTML modules, and a few of my own modules.
  7. Add the Language Switcher Module.
  8. Iteratively check the site for consistency. As an FYI, any pages that don't show up in the menu it is probablybecause they not categorized in the correct language.

Colin Mercer June 2019

Print Email

This site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.