Title: Translate post date?
Last modified: October 25, 2017

---

# Translate post date?

 *  Resolved [sixtyseven](https://wordpress.org/support/users/sixtyseven/)
 * (@sixtyseven)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/translate-post-date/)
 * Hi from Germany,
 * I was looking for an easy to use post carousel solution and stumbled over your
   nice plugin. Works like a charm so far. But as usual, I ran into an issue: I 
   am unable to translate the date in the ig-posts-carousel shortcode.
 * I have a bit of php knowledge, so I handeled it this way (using wpml):
 *     ```
        <?php
       			if(ICL_LANGUAGE_CODE == 'en'){
       				$format = get_the_date('F j, Y');
       			} else if(ICL_LANGUAGE_CODE == 'es'){
       				$format = get_the_date('j F, Y');
       			} else if(ICL_LANGUAGE_CODE == 'de'){
       				$format = get_the_date('j. F Y');
       			} else {
       				$format = get_the_date();
       			}
       			?>	
       ```
   
 * and then replace `<span class="date"><?php echo get_the_date(); ?></span>` with`
   <span class="date"><?php echo $format; ?></span>`
 * Works, but will be gone after your next update. Maybe you could incorporate a
   filter for that situation, like this: `<span class="date"><?php echo apply_filters('
   ig-posts-carousel-date',get_the_date()); ?></span>`
 * Others than that: Nice and easy, not as bloated as many other post carousels.

Viewing 1 replies (of 1 total)

 *  Plugin Author [iografica](https://wordpress.org/support/users/iografica/)
 * (@iografica)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/translate-post-date/#post-9694832)
 * Hi, sorry for the delay.
    Thank you, we will incorporate the code in the next
   update. If you like the plugin please leave a review!

Viewing 1 replies (of 1 total)

The topic ‘Translate post date?’ is closed to new replies.

 * ![](https://ps.w.org/ig-posts-carousel/assets/icon-256x256.png?rev=1439925)
 * [IG Posts Carousel](https://wordpress.org/plugins/ig-posts-carousel/)
 * [Support Threads](https://wordpress.org/support/plugin/ig-posts-carousel/)
 * [Active Topics](https://wordpress.org/support/plugin/ig-posts-carousel/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ig-posts-carousel/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ig-posts-carousel/reviews/)

## Tags

 * [date format](https://wordpress.org/support/topic-tag/date-format/)

 * 1 reply
 * 2 participants
 * Last reply from: [iografica](https://wordpress.org/support/users/iografica/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/translate-post-date/#post-9694832)
 * Status: resolved