Replace wording

Home Forums Additional Help Translations Replace wording

  • This topic has 10 replies, 3 voices, and was last updated 7 years ago by Michalis.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1261942
    Michalis
    Participant

    Hi,

    http://www.latsia.eu/event/

    In the link above everything is translated to the current language except the word “for” after the month.

    Can you please:

    – let me know where should i go to replace it with the greek word?
    – if the above isn’t possible, can you tell me where can i replace it with a “-” so that it is common in all languages?

    For example: Events – March 2017

    Thanks

    #1262179
    Courtney
    Member

    Hi George,

    To get the best help possible, I’m going to move this thread into the Translations forum. Our company retreat is about to conclude, and I expect you’ll get a response from one of the translation team soon.

    thanks,
    Courtney 🙂

    #1264678
    Michalis
    Participant

    Hi,

    Any updates on this?

    • This reply was modified 7 years ago by Michalis.
    #1265557
    Geoff B.
    Member

    Good evening George,

    At my colleague Courtney’s request, I will be chiming in this thread.

    As a first troubleshooting step, could you please provide us with your complete system information in a private reply using the instructions found in the following link?

    https://theeventscalendar.com/knowledgebase/sharing-sys-info/

    What is going on is that the language files for the Greek language are not fully translated yet.

    The best way to fix this would be to update the language files and simply add the translation for the ‘%1$s for %2$s’ strings.

    Here is some recommended reading on the topic:

    1. https://theeventscalendar.com/knowledgebase/incomplete-translations/
    2. https://theeventscalendar.com/knowledgebase/how-to-override-plugin-language-files/
    3. https://theeventscalendar.com/knowledgebase/translating-the-events-calendar/

    If you are up for it, you can even contribute to the translations for the benefit of all Greek-speaking users: http://translations.theeventscalendar.com/projects

    Short term, you could also customize the template for the different views and remove the “for” mention altogether.

    You might want to read our Themer’s guide to get a sense of how that works.

    Let me know if you need help with either of those.
    In fact, if you could tell me what the translation of “for” is in Greek, I should be able to help out.

    Have a great day!

    Geoff B.

     

    #1265656
    Michalis
    Participant

    Hi,

    I did the following change in the following files but nothing changed:

    msgid “%1$s for %2$s”
    msgstr “%1$s για %2$s”

    wp-content/languages/el.po
    wp-content/plugins/events-calendar-pro/lang/tribe-events-calendar-pro-el.po
    wp-content/plugins/the-events-calendar/lang/the-events-calendar-el.po

    Am i doing something wrong? I also suggested that if it too much trouble to translate that word, then it would be ok to just add a dash in its place: so it can be like:

    “Events – April 2017” instead of “Events for April 2017”

    Thanks

    #1266121
    Geoff B.
    Member

    Good afternoon George,

    Thank you for writing back.
    I am sorry your efforts were not met with more success.

    Let’s try to make that better.

    You can apply the following snippet in the functions.php file of your theme (without the PHP tag at the top):

    function tribe_custom_theme_text ( $translation, $text, $domain ) {
    $custom_text = array(
    '%1$s for %2$s' => '%1$s για %2$s'
    );
    if( (strpos($domain, 'tribe-') === 0 || strpos($domain, 'the-events-') === 0 || strpos($domain, 'event-') === 0) && array_key_exists($translation, $custom_text) ) {
    $translation = $custom_text[$translation];
    }
    return $translation;
    }
    add_filter('gettext', 'tribe_custom_theme_text', 20, 3);

    I did the following change in the following files but nothing changed:

    msgid “%1$s for %2$s”
    msgstr “%1$s για %2$s”

    There are actually several of these (for the different views), so it is possible you might not have changed all of them.

    When translation file strings are not kicking in, it is usually caused by one of the following things:

    1. Your translation files are not up to date
    2. You are using some customized translation files that have been placed in the /wp-content/languages/ or /wp-content/languages/plugins/ folder. These will always have priority over any other language file.

    In the first 2 cases, the solution is to update your translation files using the pot file. You can do this by using the Poedit software and heading to Catalog > Update from pot file.

    I just updated these files and tested them, if you want to grab them: fortranslation

    Let me know how that goes.

    Best regards,
    Geoff B.

    #1266433
    Michalis
    Participant

    Hi,

    Adding the snippet in functions.php did not work at all.

    The language files you are providing, where should be placed? We are spending a lot of time in order to fix the issue so please be as more specific as you can regarding the directions. You only reply once a day so please be totally clear about what needs to be done. You are mentioning a software. What is it and how can we use it? is it indeed a software or a wordpress plugin?

    #1266460
    Geoff B.
    Member

    Good morning George,

    I must say I am surprised that the snippet did not work.
    I personally tested it out before sharing it with you.

    In any case and to your point, the important thing is to find a solution that works for you.
    As you might guess, I share your goal of that happening as quickly as possible.

    the language files you are providing, where should be placed?

    In /wp-content/plugins/the-events-calendar/lang/ or preferably in wp-content/languages/plugins/ (the latter will make sure you don’t need to do this every time you update the plugin).

    You are mentioning a software. What is it and how can we use it?

    The free software in question is Poedit (https://poedit.net/) it is also referenced at the bottom of the article I previously shared with you https://theeventscalendar.com/knowledgebase/how-to-override-plugin-language-files/

    This software is THE only proper way to modify language files.
    If you simply open a language file with a text editor, it will not recompile the .mo file and will not work (which is what I suspect happened in your case).

    To simplify:

    1. You open your language’s .po file with Poedit
    2. You make your changes with it’s interface
    3. You save the file
    4. You upload both the .po and the .mo files back to /wp-content/plugins/the-events-calendar/lang/ (this location might change if you are translating our Pro add-on language file) or preferably in wp-content/languages/plugins/

    Let me know how that goes.

    Best regards,
    Geoff B.

    #1266489
    Michalis
    Participant

    Brilliant,

    I manage to translate any words needed using Poedit.

    Many thanks indeed!

    #1266704
    Geoff B.
    Member

    Good afternoon George,

    I am super stoked that this worked out for you.

    You are welcome back in our support forums any time 🙂

    For now, I am going to close this thread.

    Have a good weekend!

    Geoff B.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Replace wording’ is closed to new replies.