Do you use some other language in your Elgg than English? If so I wish you would give comments about this idea.
Elgg has a lot of generic action words:
"Delete", "Accept", "Reject", "Ban", "Open", "Close", etc.
It would be useful to have a similar translation for example for "[action] all":
"Delete all", "Accept all"," "Reject all", etc.
...and for "[action] selected items":
"Delete selected items", "Accept selected items", "Reject selected items", etc
There would be an awful amount of repetitive translation strings in Elgg if all these words had their own translation.
So how about adding specialized action strings:
action:all:
// 'delete' => 'Delete'
$delete = elgg_echo('delete');
// 'action:all' => '% all'
$delete_all = elgg_echo('action:all', $delete);
// Prints "Delete all"
echo $delete_all
action:selected
// 'delete' => 'Delete'
$delete = elgg_echo('delete');
// 'action:selected' => '% selected items'
$delete_selected = elgg_echo('action:selected', $delete);
// Prints "Delete selected items"
echo $delete_selected
With this kind of approach there would be not need to repeat similar translations in the language file.
But the question is: would this idea work with all the different languages?
(The "Multilingual Elgg" group might had been the correct place for this topic but then again that group has 91 members and this one has 1000.)
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
I'll start: in Finnish language this idea would work perfectly. :)
Excellent idea!
I'm using it already for all my projects with English\German\Russian languages
@Michele That's what I was affraid of. How is this problem solved in the current Elgg translations for those languages? Are there a lot of weird translations because of this? Is there any way that this idea could work?
@Michele Just we'll get rid a lot code with translations :)
@Michele
But I suppose this idea wouldn't really introduce any new problems?
Even if the idea wouldn't be implemented in Elgg there would still be the same problems you mentioned. (Oh and Finnish also has sometimes challenges with singular/plural but I have found very good solutions for them.)
I wonder if there is any software that has support for translating strings so that singular/plural and all genders etc. are taken into consideration. This kind of internationalization system would probably be very complicated.
Would it help to have a couple of different versions of the action:all and other strings?
Here's how I do it for English\Russian (as example)
en.php
ru.php
I commented on this in the PR, but will say it here, too. The string substituion doesn't work in many languages, so I've found the best way to keep strings translatable is to define each permutation. It grates against my DRY nerves, but it's reliable.
@M - the Dont Repeat Yourself principle ;)
contrasts to the WET Write Everything Twice principle
ps: these are *not jokes but serious principles of Software Engineering.
Hm, seems that this idea wasn't very usable. There are just too many differences between different languages.
Well, at least I learned something new about internationalization. :)
- Previous
- 1
- 2
- Next
You must log in to post replies.