Hi,

Nice module, works really good.

I wonder whether there's an official source of the little flag PNGs. For example, I'd need Dutch, Chinese, etc.

Also, the language selection and order could be done in settings, instead using the files.

Thanks!

Comments

blinkingtwelve’s picture

Assigned: Unassigned » blinkingtwelve

Thanks!

Dutch is is included in the latest versions (nl.png). The flag icons are taken from KDE. One place you can find them is the source package kde-data on the gentoo mirrors:
http://mirror.switch.ch/mirror/gentoo/distfiles/kdebase-3.5.10.tar.bz2
They're called 'flag.png' and are in directories named after the flag's locale. You need to figure out which language code Google Translate will take as an argument and name your flag icons after that. If you can post back your new mappings (GT langcode -> KDE locale) in this thread then I'll be sure to include them in the next release.

As for language selection - it's going to be one hell of a form to display all the language options and to let the user reorder them. 90% of the module's code would consist of this form... Configuration by file system is indeed unconventional, but it can be very powerful.

vacilando’s picture

Thanks - I had overlooked nl.png.

The main disadvantage I see is that when you publish an updated version of the module and people install it, the standard images will mix with the reordered custom ones, resulting in a pretty confusion. So it becomes one of the special modules where we always have to remember to watch out when updating, which is a pain.

What you could do, if you don't want to go for the full-fledged jQuery drag'n'drop reordering system, would be simply to display a list of the images in a generated table (they're small and will fit nicely) with a dropdown of numbers from 1-N where N is the total number of languages/flags. The default value would be blank, meaning that that flag should not display. So it would take some time to order things for the first time, but they'd be remembered between updates.

vacilando’s picture

Title: More flag images? » Form-based flag settings?
blinkingtwelve’s picture

The main disadvantage I see is that when you publish an updated version of the module and people install it, the standard images will mix with the reordered custom ones, resulting in a pretty confusion. So it becomes one of the special modules where we always have to remember to watch out when updating, which is a pain.

I see, good point.
In the next release, I'll empty the enabledlangs subdirectory. That would solve upgrading pains, as you can then unpack a new release on top of the older release and your config would stay untouched.

blinkingtwelve’s picture

Status: Active » Closed (fixed)

As per release 5.x-1.4 and 6.x-1.2, the 'enabledlangs' subdir is empty. Upgrading is therefor no longer an issue since you can just unpack on top of the older version. At the moment I feel that the benefits of form-based settings do not outweigh the drawbacks so I won't be implementing that anytime soon.