Home Forums Trusted Pro Translating "Recent" label

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2653
    Adri Oosterwijk
    Participant

    Hi,

    I’m converting my site to the Trusted Pro theme. It looks great and it is working great. My thumbs up for this theme.

    As you know we are able to add the most recent WooCommerce products to the home page through the Customizer. The standard heading for this section is “Recent”. There is an option to change this heading text in what ever I want. I have changed it to “Our newest additions”. The problem is when I try to find this string in WPML String Translation it never comes up. No matter what I try. Scanning for new strings, try to find it with a “search”. It simply is not found.

    Your advice please..

    Best wishes,

    Adri

    • This topic was modified 6 years, 5 months ago by Andy. Reason: moved from Trusted to Trusted Pro
    #2656
    Andy
    Keymaster

    Hi Adri

    In WPML String Translation you can add it manually with the key name tab_label_recent

    Example
    Domain: admin_texts_theme_mods_trusted-pro
    Key name: [theme_mods_trusted-pro]tab_label_recent

    In case you need to translate the other tabs, the full list is:

    • tab_label_recent
    • tab_label_featured
    • tab_label_sale
    • tab_label_best
    • tab_label_rated

    Hope this helps.

    #2660
    Adri Oosterwijk
    Participant

    Hi Andy,

    Thank you for your quick reply.

    However, and excuse my ignorance I did not get it to work.

    First, I’m not talking about the label (and IMHO you are) but about the value. Default the value is “Recent” also and this string is found by WPML String translation. Translating it in something Dutch like “Laatst toegevoegd” still shows me the string ‘Recent” on the front-end.

    What I want to achieve is: on an English page -> “Our latest additions” and on a Dutch page “Laatst toegevoegd”. Sorry but it does not seems to work. As you can see on the screenshot below, the page is Dutch but the text above the recent products remain in English.

    Can you please elaborate a bit more? Thanks.

    Dutch page, english text

    #2663
    Andy
    Keymaster

    The theme has a language translation template /languages/trusted.pot which contains all the translatable strings – ‘Recent’ is one of these strings so it can be translated into any language.

    But if you change the default ‘Recent’ to ‘Our latest additions’ then the translation plugin won’t automatically translate ‘Our latest additions’ to ‘Laatst toegevoegd’ because it cannot find ‘Our latest additions’.
    It can only know to translate ‘Recent’ so the new string ‘Our latest additions’ needs to be added as a translatable string.

    This can be done either by creating your own language template containing the string ‘Our latest additions’ or by adding the key value tab_label_recent as that is the key of the new value in the database, so WPML will know to translate whatever the value of tab_label_recent is into a different language.

    Go to ‘WPML’ > ‘String Translation’

    click ‘Translate texts in admin screens’

    look down the list for ‘+ theme_mods_trusted-pro’ click it to open

    look for key name ‘tab_label_recent’ and check the box next to it
    (plus any others you may want to translate)

    click ‘Apply’

    you should see message “The selected strings can now be translated using the string translation screen”

    go back to the String translation screen and you should see the newly added string ready to be translated

    #2666
    Adri Oosterwijk
    Participant

    Hey Andy,

    Thank you again for your quick response.

    I followed you steps but sadly no avail.

    In the customizer my text is: Our new additions (see screenshot)

    I went over to the String Translation -> Translate Admin texts (see screenshot)
    Note that it is not in the theme_mods_trusted-pro section but in the theme_mods_trusted-pro-child section. As you can see I have ticked it.

    I clicked “Apply” and got the message (see screenshot)

    I went over to String Translation again and performd a search for “our newest additions”. No translatable strings were found. (See screenshot)

    What did I miss? Or is it a flaw elsewhere?

    HTH

    Best wishes,

    Adri

    #2673
    Andy
    Keymaster

    I tested the steps exactly the same as you did and the string is there right at the top (I think because it is the newest added) ready to be translated. See screenshot.

    The only thing I can think of is the ‘select which strings to display’ filter, if you have ‘translation complete’ selected it won’t show in the list. I don’t know if this is applicable as I’m sure you would have thought of that.

    #2680
    Adri Oosterwijk
    Participant

    Hi Andy,

    What ever I do…. no avail. What strikes me also is that when you test it (as I see in your screenshot) a textdomain name is appearing. At my end not, not even in the pull down menu. Any suggestions?

    I revert it back to the default text (Recent) as the word is in English and Dutch the same until we find a solution. I tried to post a support ticket over at WPML but their site is very wacky at this moment so I was unable to post one.

    I hope you will keep me in the loop as I will keep you informed about my progress with WPML.

    Regards,

    Adri

    #2683
    Andy
    Keymaster

    As I understand it, the domain admin_texts_theme_mods_trusted-pro-child should have been added but I am not an expert with WPML. I hope that you will be able to post a support ticket over at WPML as they are sure to have much more knowledge of their plugin than I do.

    If I email you a WPML configuration file, do you have the ability to upload it to your site in this location: .../wp-content/themes/trusted-pro-child/ ?

    #2684
    Adri Oosterwijk
    Participant

    Hi Andy,

    The textdomain should be added indeed but it’s not…..

    When you send me the config file I’m able to put it in my child themes folder. So please do.

    I have submitted a ticket to WPML but did not receive a response yet.

    Please do send me the file and I keep you posted.

    Adri

    #2686
    Andy
    Keymaster

    OK, sent you the config file. Please put in the theme folder and that should let the WPML plugin know which customizable text strings are available for translation.

    #2687
    Adri Oosterwijk
    Participant

    Hi Andy,

    Got it working. Thanks.

    It is a bit in a weird way but still.
    I had changed the text in the customizer from “Recent” to “Our latest additions.”
    Next I went to the String Translation -> Translate text in admin screens and checked the correct field.
    I applied it and went over to the String Translation table again.
    To my surprise I saw a new string at the top of the table. The string was called “Recent” but with the correct domain and name. I decided to translate “Recent” to “Laatst toegevoegd” and now I see on an English page “Our latest additions” and on the translated Dutch page “Laatst toegevoegd. Just what I was aiming for.

    A weird way but still it works. Thanks for now and I will mark it as resolved. When there are additional issues regarding this I will open a new ticket.

    See the screenshot for the appearance on the String translation table and the other ones for the result.

    Best wishes,

    Adri

    #2688
    Adri Oosterwijk
    Participant

    Hi Andy,

    I applied the string to be translated again and guess what? Now the correct English string is showing just fine. See screenshot.

    I absolutely don’t know what was causing it but it appears to be working fine.

    Best wishes,

    Adri

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Translating "Recent" label’ is closed to new replies.