• Hi there

    I tried to translate text in sitemap page to spanish, I just want to show “pages” and “post by category” but in spanish, I couldn’t found specific instructions here or in the FAQ…

    I already read all questions here in support related to languages, someone said that they can do it in settings at the bottom, went there and I can see that the code there is related to language but I don’t know what to include or edit to switch it to spanish, right know it display English as the default language but in the settings it shows something about French and Russian so I’m confused.

    I edited the code where it says “fr” used “es” also used the language file name in some places, pasted the whole code in the Spanish file in Settings in 2 different places etc. did as much as I could and I was checking if it worked with every move I did but nothing happened, I hope someone can help me to implemment the translation, thanks for your time.

    here’s the bottom code in settings:

    </div><!-- .meta-box-sortables .ui-sortable -->
    				</div><!-- post-body-content -->
    				<!-- sidebar -->
    				<div id="postbox-container-1" class="postbox-container">
    					<div class="meta-box-sortables">
    						<div class="postbox">
    						<h3 class="hndle"><span><?php esc_html_e('About', 'wp-sitemap-page'); ?></span></h3>
    						<div style="padding:0 5px;">
    							<?php
    							$fr_lang = array('fr_FR', 'fr_BE', 'fr_CH', 'fr_LU', 'fr_CA');
    							// WP Constant WPLANG does not exists anymore
    							// https://core.trac.wordpress.org/changeset/29630
    							$WPLANG = get_option('WPLANG', '');
    							// check if language is in French
    							$is_fr = (in_array($WPLANG, $fr_lang) ? true : false);
    							// Get the URL author depending on the language
    							$url_author = ( $is_fr===true ? 'http://tonyarchambeau.com/' : 'http://en.tonyarchambeau.com/' );
    							?>
    							<p><img src="<?php echo WSP_USER_PLUGIN_URL; ?>/images/icon-html-code-24.png" alt="" style="vertical-align:middle;" /> <?php echo wsp_esc_some_html_tags(sprintf(__('Developed by <a href="%1$s">Tony Archambeau</a>.', 'wp-sitemap-page'), $url_author)); ?></p>
    							<p><img src="<?php echo WSP_USER_PLUGIN_URL; ?>/images/icon-star-24.png" alt="" style="vertical-align:middle;" /> <a href="https://wordpress.org/support/view/plugin-reviews/wp-sitemap-page?filter=5" target="_blank"><?php esc_html_e('Rate the plugin on WordPress.org'); ?></a></p>
    							<p><img src="<?php echo WSP_USER_PLUGIN_URL; ?>/images/icon-coin-24.png" alt="" style="vertical-align:middle;" /> <a href="<?php echo WSP_DONATE_LINK; ?>" target="_blank"><?php esc_html_e('Donate', 'wp-sitemap-page'); ?></a></p>
    							<?php
    							// Display the author for Russian audience
    							if ($WPLANG == 'fr_FR') {
    								?>
    								<p><img src="<?php echo WSP_USER_PLUGIN_URL; ?>/images/icon-html-code-24.png" alt="" style="vertical-align:middle;" /> <?php echo wsp_esc_some_html_tags(sprintf(__('Translated in Russian by <a href="%1$s">skesov.ru</a>.', 'wp-sitemap-page'), 'http://skesov.ru/')); ?></p>
    								<?php
    							}
    							?>
    						</div>
    						</div><!-- .postbox -->
    					</div><!-- .meta-box-sortables -->
    				</div><!-- #postbox-container-1 .postbox-container -->
    			</div><!-- #post-body .metabox-holder .columns-2 -->
    			<br class="clear" />
    			
    			<?php if ($current_tab=='main') : ?>
    			<div>
    				<?php submit_button();?>
    			</div>
    			<?php endif; ?>
    			
    		</div><!-- #poststuff -->
    		
    
    		
    	</form>
    </div><!-- .wrap -->
  • The topic ‘I tried, don’t know how to implemment translation’ is closed to new replies.