News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Ability to have different readmes in packages

Started by digger, December 03, 2009, 12:44:07 AM

Previous topic - Next topic

digger

QuoteNew feature: ability to have different readmes in packages for different languages

Is there any instruction how mod authors can use it?

Windy

All unsolicited PM's will be ignored.  Any support requests should go in their topics.

My Mods


Image Zoom Tag
Image Quote Removal
Color Picker
Additional Polls
Simple Awards System

Mods are only updated to the latest same major version of smf on request.

digger


Arantor

It does indeed. I believe 2.0 RC1.2 has this too, though I haven't tested.

In the <install for="2.0 RC2"> block, when you add the readme, specify lang in the <readme>, e.g <readme lang="English (British)">

Note that unlike all other areas of SMF, the lang block doesn't tie up a given language, but the string you specify in lang is what is actually displayed to the admin.

karlbenson

Because the language may provide a language that the user understands, but not matching a language installed.
eg if the mod supports english, spanish_es
and the forum uses english or spanish_latin
at least the user is able to choose Spanish_es.

If you have criticisms of how it works at the moment I would love to hear them.  Should it only show languages installed?

There isn't any documentation for it at the moment.
- You can specify alternative languages using lang="" parameter in readme element

If your smf doesn't support lang, it will use the last one / fallback. (eg 1.0.x, 1.1.x, 2.0 rc2.1 and earlier)
(this is because until my tag, smf didn't recognise more than one readme tag, any other ones would overwrite the last one)
Generally thats why it would be best to put your fallback readme without a lang attribute last.

I've attached a package I made when I was testing it.

Arantor

Maybe it should only display for installed languages, and have the lang attribute tie up to the standard strings, but I do kind of like this approach actually. English_british is less clear to me than English (British) when reading even though it amounts to the same thing.

I don't know. I've not seen this in much use, and until we start seeing translations covering readmes too, I don't think it's a huge issue either way.

Windy

Perhaps being able to specify multiple languages?
All unsolicited PM's will be ignored.  Any support requests should go in their topics.

My Mods


Image Zoom Tag
Image Quote Removal
Color Picker
Additional Polls
Simple Awards System

Mods are only updated to the latest same major version of smf on request.

Arantor

What, for the same readme?

Easy: lang="English / English (British)"

Or even simply "Spanish / Espanol"

It would be nice IMO to tie into installed languages though, perhaps lang="Spanish / Espanol" installed="Spanish_es,Spanish_latin" (not UTF-8 versions)

Windy

Yeah, multiple languages for the same readme, similar to what you've posted.

I think that it should tie in with installed languages, I would say it's ok to assume that the person installing the mod would want the readme in the same language as the language they are currently using and that considering that the user installing the packages is also most likely the same person that decides what languages get installed to begin with I would sort of say it makes that point sort of moot.

If you wanted to cover all bases, you could set it up so it selects the users language by default, but still gives them the option to select another language.
All unsolicited PM's will be ignored.  Any support requests should go in their topics.

My Mods


Image Zoom Tag
Image Quote Removal
Color Picker
Additional Polls
Simple Awards System

Mods are only updated to the latest same major version of smf on request.

karlbenson

If the language specified matches the current language in use, then it will select that automatically.
Please forgive me, its been so long since i coded it, I'm trying to remember.

One a single parameter can be entered.
lang="english"

You can link to the same file multiple times eg
<readme lang="spanish" type="file">readme_sp.txt</readme>
<readme lang="spanish_es" type="file">readme_sp.txt</readme>

Part of the reason for the not just showing languages installed is that some mods might not support any installed languages.
even English.  Part of the internalisation of SMF means that more non-english communities are making mods.

Advertisement: