- This topic has 3 replies, 3 voices, and was last updated 8 years ago by Mahesh.
-
AuthorPosts
-
December 5, 2016 at 3:25 pm #104565filip_1Participant
Hello,
is there a way to translate content on the page from english to croatian ?
For example: my calendar widget and archive widget are set to english and under the post title there is “no comment” and the date also set to english and I want them to be set to croatian… and also some other things I want to translate to croatian but I cannot find a way I could manage to do that.
Link: http://www.zupa-bezgresnog-zaceca-bdm.hr/
Thank you a lot for your help,
Filip
December 6, 2016 at 8:58 am #104607PratikParticipantHi @filip_1,
I am working on this. In the mean time, can you let me know exactly which language you, have chosen in WordPress admin section?
Regards,
PratikDecember 6, 2016 at 3:37 pm #104634filip_1ParticipantHi,
Thank you for your assistance and support. I have chosen English(United States) in admin section .
Filip
December 7, 2016 at 4:00 pm #104784MaheshParticipant@filip_1: For this, you’ll need to create a child theme. You can find more details on creating child theme HERE. Then in you child theme’s
functions.php
add the following codes:function simplecatch_loop() { if ( is_page() ): ?> <section <?php post_class(); ?> > <header class="entry-header"> <h1 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php echo esc_attr( get_the_title() ); ?>"><?php the_title(); ?></a></h1> </header> <div class="entry-content clearfix"> <?php the_content(); // copy this <!--nextpage--> and paste at the post content where you want to break the page wp_link_pages(array( 'before' => '<div class="pagination">Pages: ', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>', 'pagelink' => '%', 'echo' => 1 ) ); ?> </div> </section><!-- .post --> <?php elseif ( is_single() ): ?> <section <?php post_class(); ?>> <header class="entry-header"> <h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php echo esc_attr( get_the_title() ); ?>"><?php the_title(); ?></a></h1> <div class="entry-meta"> <ul class="clearfix"> <li class="no-padding-left author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="<?php echo esc_attr(get_the_author_meta( 'display_name' ) ); ?>" rel="author"><?php _e( 'By', 'simple-catch-pro' ); ?> <?php the_author_meta( 'display_name' );?></a></li> <li class="entry-date updated"><?php $simplecatch_date_format = get_option( 'date_format' ); the_time( $simplecatch_date_format ); ?></li> <li><?php comments_popup_link( __( 'No Comments', 'simple-catch-pro' ), __( '1 Comment', 'simple-catch-pro' ), __( '% Comments', 'simple-catch-pro' ) ); ?></li> </ul> </div> </header> <div class="entry-content clearfix"> <?php the_content(); // copy this <!--nextpage--> and paste at the post content where you want to break the page wp_link_pages(array( 'before' => '<div class="pagination">Pages: ', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>', 'pagelink' => '%', 'echo' => 1 ) ); ?> </div> <footer class="entry-meta"> <?php $tag = get_the_tags(); if (! $tag ) { ?> <div class='tags'><?php _e( 'Categories: ', 'simple-catch-pro' ); ?> <?php the_category(', '); ?> </div> <?php } else { the_tags( '<div class="tags"> ' . __('Tags', 'simple-catch-pro') . ': ', ', ', '</div>'); } ?> </footer> </section> <!-- .post --> <?php endif; } // simplecatch_loop
And then copy
content.php
to from parent theme to child theme.And replace No Comments string in both files with your desired text in Croatian.
After that, go to Dashboard=> Settings=> General and select Hrvatski option in Site Language drop down.
Hope this helps. Let me know if any problem.
Regards,
Mahesh -
AuthorPosts
- The topic ‘Simple Catch Translation’ is closed to new replies.