I see this point. There is actually some support for this already, but the skin developer needs to add a "language" combo box for it to work. However, adding this combo box (which some skins do) forces the majority of users to keep track of two language settings, which can be confusing, unless the default is to obey the preference language. Given this, I've improved the logic and also made it far easier for skin developers to provide their own language list. See the attached "Minimal.jaskin" file for how you can add your own "language" combo box to your skin, which also has a "<jAlbum preference>" option as the default setting. You also need v23.2.1 for this to work, so please do a core update first.
This new Languages.modelFrom() API populates the combo box with the languages your skin supports. It uses "Item" objects so it can present full names for each language, but feed jAlbum the ISO_2 language code instead.
And is there no way for a user to enter a language for which there is no "texts" file in the skin or the core? In my skins, I let the user specify the HTML language. The list picks up all of the "texts" choices from the jAlbum core (not from the skin, which doesn't have any), but the user can also enter any of the standard codes. So, if he's built an album in which he's specified all of the tooltips, titles, and comments in Urdu, he can also get the page to include:
The skin stashes the choice in a skin-specific variable, htmlLanguage, to avoid any potential collisions.
Yes, the list simply presents the languages found under the directory you specify as argument. Isn't this the best approach? By using the name "language", jAlbum's engine reads it and ensures that all text.xyz constants are set up properly.
No, what would be the point of that?
I thought I explained that already. The user might have created an album in which everything is in Urdu. The <html> tag should have an indication that the language of the page is Urdu. The interwebs don't know or care what "texts" files there are in the app.
I see this point. There is actually some support for this already, but the skin developer needs to add a "language" combo box for it to work.
I am surprised that I have to change the skin to save the language setting in the project file!
That is not required for other jAlbum settings like dateFormat sharpenPercent, imageSize etc.
In the minimal skin the user can only select languages from which text properties files are available, so for instance Dutch can't be selected.
I don't understand this I think all languages should be selectable, also if no text properties file is available for the skin, so the the <html lang="xx> tag can be set in the index file.
A basic problem is that the skin crashes if jAlbum 23.2.1 is not used, so the skin can no longer be used by users of old jAlbum versions.
So I am sorry to say, but this implementation is not acceptable for me.
It should be possible to save the language setting in the project file independent of the used skin I think.
I select as language under Preferences / General English for the sample albums for my skins, but for my private albums I use there the Dutch language,
Why not stick to Dutch for your sample albums? As a sample, people will only be interested in the layout and styles and not the textual content. But if you don’t want to use Dutch, why not use Loren ipsum.
In my skins, I don't think it would matter. There's a skin variable, htmlLanguage, that picks up the jAlbum language setting, but offers all of the other options, based on the core's "texts" files (not the skins). It also allows entry of any other code the user likes. The skin uses that variable to set the HTML page language, but that's all.
There isn't any collision, because the skins aren't using the jAlbum language setting for anything else - my skins don't have any "texts" files at all. The user can make things like tooltips say anything he wants, simply by entering text in the UI. He never has to wade into manual editing of a confusing file. And those all get saved with the project.