jDiction Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

jDiction 2.2.0 released. http://jdiction.org/downloads

Pages: [1] 2

Author Topic: jDiction language switcher language name with 2 symbols  (Read 22532 times)

wonderland

  • Newbie
  • *
  • Posts: 21
    • View Profile
jDiction language switcher language name with 2 symbols
« on: March 09, 2015, 04:41:50 pm »

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.
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: jDiction language switcher language name with 2 symbols
« Reply #1 on: March 09, 2015, 06:20:39 pm »

in the language switcher module you can change the settings or with some html knowhow you can override the template.
Logged
Joomla! 5.0 Release Manager
Vote at JED

wonderland

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: jDiction language switcher language name with 2 symbols
« Reply #2 on: March 09, 2015, 08:45:45 pm »

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.
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: jDiction language switcher language name with 2 symbols
« Reply #3 on: March 09, 2015, 09:26:27 pm »

good and when you copy your default.php to /templates/<yourtemplate>/html/mod_jdlanguage/default.php it will be preserved after the next update
Logged
Joomla! 5.0 Release Manager
Vote at JED

wonderland

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: jDiction language switcher language name with 2 symbols
« Reply #4 on: March 09, 2015, 10:12:12 pm »

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 :)
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: jDiction language switcher language name with 2 symbols
« Reply #5 on: March 09, 2015, 10:38:21 pm »

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 will consider this.

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.
If you click on the blue "I" it copies the text.

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 :)
Thanks, every help is welcome!
Logged
Joomla! 5.0 Release Manager
Vote at JED

wonderland

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: jDiction language switcher language name with 2 symbols
« Reply #6 on: March 11, 2015, 05:59:26 pm »

I actually tried pressing the blue "I" button many times now but not once did the original text copy over.  I can delete the text written by pressing red "X" button, but If I press the blue "I" no text gets copied.

I think I found a bug as well. When I write text in the main text area, without entering intro text (because you don't always have intro text) the whole text of original language gets copied over, please see attached images.

If I then go back to administration panel write something in intro text area and then delete it, the main language text disappears.

I also wanted to ask is it mandatory that there are 2 content areas, intro text and main text? I think the interface would look so much cleaner if there would be just one content box. And people who don't use blog type layouts don't often use "Read More" function to split their text.
« Last Edit: March 11, 2015, 06:12:11 pm by wonderland »
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: jDiction language switcher language name with 2 symbols
« Reply #7 on: March 11, 2015, 06:12:50 pm »

please open the javascript console of your browser and paste the error massage after clicking of the "I".

If you only translate the full text it will use the introtext of the original language. You can type a space into the intro text to overwrite this.
Logged
Joomla! 5.0 Release Manager
Vote at JED

wonderland

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: jDiction language switcher language name with 2 symbols
« Reply #8 on: March 11, 2015, 06:26:31 pm »

I get this error:
TypeError: e is undefined
....fire("BeforeSetContent",t),e=t.content,0===e.length||/^\s+$/.test(e)?(i=n.setti...

Regarding the previous thing I mentioned, if I write something in the intro text box and then press the red "X" and leave it empty the entire content of original language also gets copied over. Is this something that is intetional?
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: jDiction language switcher language name with 2 symbols
« Reply #9 on: March 11, 2015, 06:29:34 pm »

yes the red X means delete the translation and take the original text.
Logged
Joomla! 5.0 Release Manager
Vote at JED

wonderland

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: jDiction language switcher language name with 2 symbols
« Reply #10 on: March 11, 2015, 10:38:28 pm »

Could you please let me know why can't I copy the content when I press the blue "I"? I tried another browser just in case, but got the same result.
« Last Edit: March 11, 2015, 10:40:05 pm by wonderland »
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: jDiction language switcher language name with 2 symbols
« Reply #11 on: March 12, 2015, 12:01:20 pm »

hmm it works for me, so I need super user access to your installation, then I can check if its a problem with the editor or k2 or the javascript framework...
Logged
Joomla! 5.0 Release Manager
Vote at JED

wonderland

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: jDiction language switcher language name with 2 symbols
« Reply #12 on: March 14, 2015, 07:41:32 pm »

I've sent the access. Thank you for looking into this.
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: jDiction language switcher language name with 2 symbols
« Reply #13 on: March 18, 2015, 10:34:47 am »

You are using JCE thats not supported atm.

Another querstion, you have installed jdiction 1.4.1 completly new correct? because the Icons in Backend are missing.
Logged
Joomla! 5.0 Release Manager
Vote at JED

wonderland

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: jDiction language switcher language name with 2 symbols
« Reply #14 on: March 18, 2015, 12:47:38 pm »

Actually, when I was testing this I also switched back to Tiny Mce, but I had the same problem. You can check the site again, I've switched back to tiny MCE, but the problem is still there.

Yes, I installed it from scratch. Which icons do you mean? The one in Tools section?
Logged
Pages: [1] 2