Advertisement:

Author Topic: Translation for DATE and DATEINTERVAL custom fields [SOLVED]  (Read 4542 times)

Lasse

  • Newbie
  • *
  • Posts: 14
Re: Jquary, names for days and months
« Reply #15 on: August 14, 2014, 02:05:11 am »
I`m sorry.... First I tryed with the script in the footer.php with se_SE insted of se-SE, but that only gave me the calender in english again. Then I loaded the search.php and item-post.php and item-edit.php with only the script part betwen the header tags again and that brought back the swedish spelling in the calendar. Then I switched the code in the item.php against the new code string that you wrote teseo, but the name of the months still comes out in English when the ads are shown  :(

Lasse
« Last Edit: August 14, 2014, 11:03:24 am by Lasse »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Jquary, names for days and months
« Reply #16 on: August 14, 2014, 02:30:53 am »
Ups, I forgot to change a line:

<font color="#822619">  <strong><?php echo osc_item_meta_name() ; ?>: <?php echo osc_item_meta_value() ; ?></strong></font>

now should be:

<font color="#822619">  <strong><?php echo osc_item_meta_name() ; ?>: <?php echo $meta_value ; ?></strong></font>

Regards

Lasse

  • Newbie
  • *
  • Posts: 14
Re: Jquary, names for days and months
« Reply #17 on: August 14, 2014, 11:08:06 am »
I just got one thing to say; Batman and Superman, go home ! Becouse I have a new Hero, and his/hers name is teseo !!  :)
It works like a charm ! Thanks teseo ! :)

Lasse

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Jquary, names for days and months
« Reply #18 on: August 14, 2014, 01:44:08 pm »
You seem to keep your promises, @lasse... :D :D You're welcome. :) Would you consider to change the name of this thread to something like "Translation for DATE and DATEINTERVAL custom fields [SOLVED]" so it could be useful to other fellows in the same situation? Thanks.

I think that the key error here is the se-SE, it should be written with underscore se_SE.

Yes, @dev101, a typo of mine. As I know you're working along with the Osclass developers, I think I should note here that seems translations of these DATE and DATEINTERVAL should be managed by default by osc_item_meta_value() in hItems.php. The code is there, but looks like the returned results are no the desired ones. ???

For instance, for DATE type, this:

Code: [Select]
return htmlentities( date(osc_date_format(), $value), ENT_COMPAT, "UTF-8");
returns formatted correct date, but in english.

This:

Code: [Select]
return osc_format_date(date("Y-m-d", $value));
would return formatted correct date in the active language.

If you deem worthy of it to study this issue and propose changes in GitHub, I would be most grateful, unfortunately my scarce free time I spend it this way, here on the forum. Thanks in advance. :)

Regards
« Last Edit: August 14, 2014, 01:48:34 pm by teseo »

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Jquary, names for days and months
« Reply #19 on: August 14, 2014, 03:41:12 pm »
As I know you're working along with the Osclass developers (...)

Hey, hey, let's not exaggerate here, shall we? ;D

I am helping as much as I can, like everyone else, 'working' is a bit of a too strong word IMO. I am writing this because each month I receive many PMs with various questions and requests that I cannot possibly fulfill.

Just on the ground :)
Regards

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Translation for DATE and DATEINTERVAL custom fields [SOLVED]
« Reply #20 on: August 14, 2014, 04:36:20 pm »
I have done a test with sv_SE and Bender with 341, and as far as date picker is in question, this codes 1+2 works fine (once you correct sv-SE part), without any modifications that followed.

However, notice that once date is selected, word inputs are in english, not sure why and if the above modifications solves that part, but frankly can't dwell into that right now - works good enough :D
« Last Edit: August 14, 2014, 04:39:41 pm by dev101 »