How to Localiza Upfront Themes?

I want to change the language of the contact form of Fixer Theme.
I uploaded the po and mo files to languages/theme in wp-content so that I won't lose it in an update, also try to upload directly into language folder inside the theme but nothing is translated.
Can anyone tell how to localiza any upfront based theme?
Thanks

  • Adam Czajczyk

    Hey @BKBAI!

    So there is no .po file for Fixer itself, only what Upfront, Right?

    That's right. Fixer is an Upfront's child theme so this translation files a common for all Upfront-based themes.

    1. Go to this site:
    https://premium.wpmudev.org/translate/projects/upfront

    2. Find your language on a list and click on its name
    3. Scroll down and
    - export .po file
    - export .mo file

    4. This downloaded files will have names like "upfront-ll_LL.po" and "upfront-ll_LL.mo" where "ll_LL" is replaced by language code. Please remove the "upfront-" part from both file names. I apologize I didn't tell you this before!

    4. Login to your server via FTP
    5. Upload both files to

    /wp-content/themes/upfront/languages

    folder

    Once this is done please go to your site's dashboard "Settings" -> "General" page, select language and save settings. Do this please even if there's already proper language set!

    I've tested this procedure on my own test WP setup so I'm sure it's working.

    I'm also unable to find those string to translate:

    It is possible. All the translations of our plugins and themes are "community powered", meaning that we issue it in English and then members of our community translate them to their own languages. This is great but it also means that some translations may take time to be completed.

    That being said, you may just add these missing strings to translation. Here's a handy resource on themes/plugins translation:

    https://premium.wpmudev.org/blog/how-to-translate-a-wordpress-theme/

    I hope this helps!

    Cheers,
    Adam

  • Vinod Dalvi

    Hi @BKBAI,

    In the meanwhile you can translate the contact form placeholder text by using the attached small plugin that contains the following code.

    function add_custom_fixer_scripts(){ ?>
    	<script type="text/javascript">
    		jQuery(document).ready(function($){
    			// setTimeout(function(){
    			$(".upfront-contact-form .upfront-field-container .ucontact-input").each(function( index ) {
    				if( $( this ).attr('placeholder') == 'Name' ){
    					$( this ).attr('placeholder','Custom Name');
    				} else if( $( this ).attr('placeholder') == 'Email Address' ){
    					$( this ).attr('placeholder','Custom Email Address');
    				} else if( $( this ).attr('placeholder') == 'Type your enquiry here' ){
    					$( this ).attr('placeholder','Custom Type your enquiry here');
    				} else if( $( this ).attr('placeholder') == 'Your name:' ){
    					$( this ).attr('placeholder','Custom Your name:');
    				} else if( $( this ).attr('placeholder') == 'Your email:' ){
    					$( this ).attr('placeholder','Custom Your email:');
    				}else if( $( this ).attr('placeholder') == 'Your message:' ){
    					$( this ).attr('placeholder','Custom Your message:');
    				}else if( $( this ).attr('placeholder') == 'Phone Number' ){
    					$( this ).attr('placeholder','Custom Phone Number');
    				}else if( $( this ).attr('placeholder') == 'CAPTCHA:' ){
    					$( this ).attr('placeholder','Custom CAPTCHA:');
    				}
    			});
    			 // }, 3000);
    		});
    	</script>
    <?php }
    add_action('wp_footer', 'add_custom_fixer_scripts');

    Change the custom text in the code to the translated text.

    Best Regards,
    Vinod Dalvi

  • BKBAI

    Can't upload the file:

    <?php
    /*
    Plugin Name: Quick Custom Solution Plugin
    Plugin URI: https://premium.wpmudev.org
    Description: Quick Custom Solution Plugin for Implementing Custom Solution.
    Version: 1.0.0
    Author: Vinod Dalvi (Incsub)
    Author URI: https://premium.wpmudev.org/
    License: GNU General Public License (Version 2 - GPLv2)
    */
    
    function add_custom_fixer_scripts(){ ?>
    	<script type="text/javascript">
    		jQuery(document).ready(function($){
    			// setTimeout(function(){
    			$(".upfront-contact-form .upfront-field-container .ucontact-input").each(function( index ) {
    				if( $( this ).attr('placeholder') == 'Name ' ){
    					$( this ).attr('placeholder','Nombre');
    				} else if( $( this ).attr('placeholder') == 'Email Address' ){
    					$( this ).attr('placeholder','Email');
    				} else if( $( this ).attr('placeholder') == 'Type your enquiry here' ){
    					$( this ).attr('placeholder','Escribe tu mensaje');
    				} else if( $( this ).attr('placeholder') == 'Your name:' ){
    					$( this ).attr('placeholder','Tu nombre:');
    				} else if( $( this ).attr('placeholder') == 'Your email:' ){
    					$( this ).attr('placeholder','Tu email:');
    				}else if( $( this ).attr('placeholder') == 'Your message:' ){
    					$( this ).attr('placeholder','Tu mensaje:');
    				}else if( $( this ).attr('placeholder') == 'Phone Number' ){
    					$( this ).attr('placeholder','Teléfono (opcional)');
    				}else if( $( this ).attr('placeholder') == 'CAPTCHA:' ){
    					$( this ).attr('placeholder','Escribe el CAPTCHA:');
    				}
    			});
    			 // }, 3000);
    				$('.submit-field').html('<span>Enviar</span>');
    				$('.ucontact-message-container').html('<div class="ucontact-msg msg error">Debe escribir un nombre.<br>Debe escribir un email válido.<br>Olvidaste escribir un mensaje.</div>');
    		});
    	</script>
    <?php }
    add_action('wp_footer', 'add_custom_fixer_scripts');

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.