Viewing 4 replies - 1 through 4 (of 4 total)
  • Barry

    (@barryhughes-1)

    Hi @nrgytrading,

    Our apologies for the delay in responding.

    1. I am trying to translate “all ages” to my language in settings, but it doesn’t change frontside.

    You can change the text for the various age restrictions if you visit GigPress → Settings.

    The new options will become available when you create new shows, but please note that any shows created before making this change would need to be update manually. Alternatively, if you feel comfortable doing so, you could update them en masse with a database query like this one:

    UPDATE wp_gigpress_shows
    SET    show_ages = 'YOUR TRANSLATION'
    WHERE  show_ages = 'All Ages/Licensed'

    2. Where can I translate countries?

    Unfortunately, in the current version of GigPress, the countries are not set up as translatable strings. However using some code like this following (which could be added either to your theme’s functions.php file or preferably to a custom plugin) you would be able to override the defaults:

    function modify_gp_countries() {
    	global $gp_countries;
    
    	// Adjust the countries you are interested in translating
    	$gp_countries['AD'] = 'Principat d\'Andorra';
    	$gp_countries['ES'] = 'Espa?a';
    
    	// Re-sort if alphabetical ordering is important to you
    	asort( $gp_countries );
    }
    
    add_action( 'init', 'modify_gp_countries' );

    I hope that helps!

    • This reply was modified 8 years, 6 months ago by Barry.

    Hello I tried to implement the above code to translate Germany into “Deutschland”. I tried different versions: $gp_countries[‘GER’] = ‘Deutschland’; $gp_countries[‘DE’] = ‘Deutschland’. Nothing works

    I implemented the code in my CSS box of my template. Would be great if you can help me. Regards and thx in advance

    Plugin Contributor Andras Guseo

    (@aguseo)

    Hi @oekom,

    The above php code in the css box will not work. CSS is used only for styling the looks of the page.

    Copy the above code into your theme’s functions.php file. You can usually find that if you click on Appearance (Design) > Editor, and then choose Theme-Funktionen (functions.php) from the right side.

    Let me know if this helps.

    Grüsse
    Andras

    Plugin Contributor Andras Guseo

    (@aguseo)

    Since this thread has been silent for more than a month I’m going to close it as resolved.

    Cheers,
    Andras

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Translate age limits and country’ is closed to new replies.