Advertisement:

Author Topic: Category header does not change when translated  (Read 1174 times)

SEE

  • Newbie
  • *
  • Posts: 25
Category header does not change when translated
« on: April 27, 2017, 02:24:33 pm »
Hi!

the site...   www.windsurfing.deals

trying to offer the website in different languages there appears this problem, ... when you select language, it changes the buttons or titles BUT... the categories main in the last language translated, even if i save again... it wont change.. any Idea? The Template developer replied that this is a OSCLASS issue,... can you please help me?

Jason

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Category header does not change when translated
« Reply #1 on: April 27, 2017, 10:43:15 pm »
Hi. Have you changed the original english words inside the php files of your theme?

Have you generated .mo files from the .po ones in the languane that does not "work" ?

SEE

  • Newbie
  • *
  • Posts: 25
Re: Category header does not change when translated
« Reply #2 on: April 28, 2017, 02:22:27 pm »
Marius, thanks fr your reply,...
I have not placed those words in any lang folder,... the thing is, it does not work neither in German... but also the problem is, that it appears in the foreign language... what i mean is,..    You have the English word, the origiinal.... and the website default is also the original(eng) and the words appear in other language..., and even if you change from the flag language, the menu does not change...

if you install another language, then under CATEGORIES in the ADMIN PANEL you can translate the word, and I did,... is it necessary also to change it in the lanf folder aswell ???

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Category header does not change when translated
« Reply #3 on: April 28, 2017, 02:56:05 pm »
ok.
Look into your oc-content/languages/en_US folder.

Open core.po

Find in it the names of categories in english. Those names are IDs. If you change a category name in your admin,
for example 'For sale' you make it 'Sale'.
In core.po (en_US) you have:

Code: [Select]
#: oc-includes/osclass/installer/basic_data.php:4
msgid "For sale"
msgstr ""

In core.po (german) you will have

Code: [Select]
#: oc-includes/osclass/installer/basic_data.php:4
msgid "For sale"
msgstr "Zu verkaufen"

In order for it to work you must replace 'For sale' in all language .po files and generate the .mo files with Poedit program.

If you add more categories, you add into your .po files  in each of your language something like this (for german for ex).

Code: [Select]
#: oc-includes/osclass/installer/basic_data.php:4
msgid "New category"
msgstr "Neue kategorie"

See here the solution for changing a text in english: https://forums.osclass.org/repurpose/help-with-free-classifieds-osclass-script-35679/msg149458/#msg149458
« Last Edit: April 28, 2017, 04:26:06 pm by marius-ciclistu »

SEE

  • Newbie
  • *
  • Posts: 25
Re: Category header does not change when translated
« Reply #4 on: April 28, 2017, 08:59:30 pm »
Hey really thanks trying to help me... this is such a pain...

in the US folder there is no category name... so I did include them, I even put them in theme.po ... of course everything was generated in .mo . I have translated in the past titles and other stuff, and it worked... however this seem to be a real stupid problem .... It should have worked in first place from the Back end Admin... thats i guess why they made it like this..so you can translate right away...

I am German, so we can try also to translate in German as well... will be the same problem...


Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: Category header does not change when translated
« Reply #5 on: April 28, 2017, 09:09:07 pm »
Sieht nach dem gleichen Problem aus, das ich auch mal hatte...
---------------------------------------------------------------------
Looks like the same problem i have earlier...




https://forums.osclass.org/development/wrong-category-language/

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
« Last Edit: April 28, 2017, 09:59:48 pm by marius-ciclistu »

SEE

  • Newbie
  • *
  • Posts: 25
Re: Category header does not change when translated
« Reply #7 on: April 28, 2017, 10:08:35 pm »
I have translated it... but the bug seems that.. when you switch lang, it does not execute the categories... it is so crazy that even if i disable the lang, it stil shows it in GR...

Im not a programmer... so if someone can help here,... from what I understand, it is not the problem that it is not translated, that it does not switch


...na so eine SCHei@@@%$^&% lol


SEE

  • Newbie
  • *
  • Posts: 25
Re: Category header does not change when translated
« Reply #8 on: April 28, 2017, 10:20:03 pm »
Liath !!!!!!! Thanks so so much !! You are my HERO ! ahahah what a feeling !! made my day !!!

Special thanks and Credits to Teseo !!!

Nice!!

THANKS !!!! YAYYYYY

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Category header does not change when translated
« Reply #9 on: April 28, 2017, 11:53:28 pm »
This was fixed officially in develop branch, but it is not yet part of main release.

fix is here:
https://raw.githubusercontent.com/osclass/Osclass/4a4d05059f3bc6c531fe1b03c33dc41b52e08b28/oc-includes/osclass/model/Category.php

The sql query is much simpler (and faster) than teseo's fix, with one drawback: it does not fallback to english if translations are missing. Still, as that is not a "normal" situation anyway, faster version is better. It will probably be part of 3.8 release.

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Category header does not change when translated
« Reply #10 on: June 29, 2017, 02:02:34 am »
Hi dev101,

you know me, a true Osclass lover who keeps coming back ;)
Anyway, the community is waiting for over a couple of years for this core functionality to be fixed so what do you mean by 'probably'?
Is there ANY reason not to fix this ASAP? I mean, imho this fix is worth an extra release similar to a security fix that is detected.

Many thanks to teseo I have a site that looks like it is top notch for over a year now and with this improved version of Liath there's no reason for further postponing this disruptive core issue, is there?. I don't understand why Osclass team didn't fix this earlier to be honest. Let's not talk about 'probably'.... let's just fix it once and for all because it is hurting Osclass popularity ie. hurting all theme and plugin creators as well as Osclass team.

This was fixed officially in develop branch, but it is not yet part of main release.

fix is here:
https://raw.githubusercontent.com/osclass/Osclass/4a4d05059f3bc6c531fe1b03c33dc41b52e08b28/oc-includes/osclass/model/Category.php

The sql query is much simpler (and faster) than teseo's fix, with one drawback: it does not fallback to english if translations are missing. Still, as that is not a "normal" situation anyway, faster version is better. It will probably be part of 3.8 release.

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Category header does not change when translated
« Reply #11 on: June 29, 2017, 06:06:17 pm »
Simply, because 3.8 will be a 'minor' release (not small bugfix release), and as it is already merged there, it is just a matter of time when it will be mainlined. Again, probably soon enough, but I do not know any dates. Best guess - when summer and holiday season pass.

Regards,
dev101

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Category header does not change when translated
« Reply #12 on: June 30, 2017, 02:11:20 pm »
Thanks dev101,

I'm truly glad it is finally coming and I think many others as well :)
With this fix I think there are not many *core* issues left with regard to a 100% functioning Osclass website Out of the Box which imo is really a good thing.

Regards,
Eric