I have a request about how vB handles language keys and image associations. I had a postbit and user profile mod for phpBB which managed this and I have only just started looking at modding vB.
The simple addition of a country flag illustrates this well.
flag_au.GIF --> Australia.GIF works but that requires renaming all the flags according to the names in the list whilst the original bundle already provides a translation key:
...
au=Australia
...
in phpBB this is done using a language key where anything called for as 'au' shows up as 'Australia'; then the menu list would be the list of keys
...
au
...
which is an easier job to edit than the actual file names - including the fact that there are spaces and capitalisation in the file names and also some exceptions to the two letter country code etc...
There must be some simple code that would allow the supplied list to be used in both the dropdown and the image file translation without a lot of editing?
Language key:
at=Austria
au=Australia
aw=Aruba
ax=Aaland
Drop down menu is then set up as
at
au
aw
ax
but displays to users as
Austria
Australia
Aruba
Aaland
and when one is selected by the language key in the profile it translates to:
flag_at.GIF
flag_au.GIF
flag_aw.GIF
flag_ax.GIF
or
flag_$post[fieldX].GIF
I hope this is a reasonable place to ask this question.
|