English > General Questions
jDiction language switcher language name with 2 symbols
wonderland:
I would like to know is it possible to have 2 symbol language name in language switcher module, instead of Full name English=EN and so on.
Harald Leithner:
in the language switcher module you can change the settings or with some html knowhow you can override the template.
wonderland:
In jDiction language module there are only these options:
Show current language
Add alternate meta tags
Style (none of options have 2character language code)
Update fragment
But none of these settings changes the display of full language to 2 letter sybmol
Then I looked into original language switcher module and found the code that can do this.
So in the end I changed this in modules/mod_jdlanguage/tmpl/default.php on line 46:
from
echo $language->title_native;
to
strtoupper($language->sef);
And now instead of displaying Englsih, I get EN.
Harald Leithner:
good and when you copy your default.php to /templates/<yourtemplate>/html/mod_jdlanguage/default.php it will be preserved after the next update
wonderland:
Yes, that I already did :).
I think it wouldn't be bad to include this option in module, I do think that others would find this useful as well.
I also think that it would be beneficial to have a copy button, when you press it it copies content from original language, it may be easier to translate in some cases, but that is up to you of course.
But mainly I would like to thank you for this extension. I will definitely give it a 100% rating on JED. Once I'm finished with this project I'm building I would like to volunteer to improve your documentation, or alternatively I could donate something :)
Navigation
[0] Message Index
[#] Next page
Go to full version