WordPress.org

Support

Support » Plugins and Hacks » Polylang » [Resolved] Add custom string translation on Polylang, working with Responsive theme

[Resolved] Add custom string translation on Polylang, working with Responsive theme

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Chouby

    @chouby

    No need for modifying one of them. Just create a new PHP file in your plugins directory and copy paste this:

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    Thanks for your fast reply.
    However i think i made it wrong because nothing change in my polylang settings. I just have some strange display on my page and admin interface?

    Could it be just a mishandling or mistake of copy/paste?

    Plugin Author Chouby

    @chouby

    I tested the code before so it should work. I repasted it on pastebin. Hopefully it will work this time. http://pastebin.com/0Aw0wDaD

    hi Chouby,

    i think i’m having the same issue ,, i’m trying to add more translation string to the Polylang plugin since there is only 4 [Site Title,Tagline ,Widget title ,Widget title ] and there is still some string in the page like [read more ..] needs to be translated, also i did not get your answer about adding a php file and what to past in it,, can you explain more ,, thanks

    nawras, still looking for an answer?

    I think I got this figured out 🙂

    Hi Chouby, I dont get this figured out. After adding the file, in Languages Strings I can add translations of the home_headline’, ‘home_subheadline’, but not of ‘home_content_area’. That does not appear. Should it or am I looking at the wrong place to add translation of the home content area?

    using Responsive Child theme, polylang Version 0.9.4 and additional plugin as above. root-cause-analysis.yeuxbleus.eu

    Plugin Author Chouby

    @chouby

    I remade the test and it works. It is important to put some content in the theme option. If you leave it empty, it will not appear in the translations list table

    thanks Chouby.

    There must be some other conditions I am not following then. (relatively new with this)

    I have copied the pasted code in a file (adjusted ‘my setting’ to Polylang Homepage) (called it polylang-homepage.php) and uploaded to a folder (polylang-homepage) in the plugins folder of the Responsive Theme.

    Activated the plugin in the child theme.

    For polylang itself two EN-US and NL are added as languages.

    I have activated all other plugins.

    headline, subheadline and content area at the theme options are filled in as you can recognize at http://root-cause-analysis.yeuxbleus.eu/

    none of these three are appearing at settings, languages, strings translations…

    what do I forget or what other conditions i have to keep into account?

    in above meant deactivated other plugins of course…

    anyone who can advise?

    Plugin Author Chouby

    @chouby

    After adding the file, in Languages Strings I can add translations of the home_headline’, ‘home_subheadline’, but not of ‘home_content_area’

    none of these three are appearing at settings, languages, strings translations…

    Have you the problem for all strings or only one?

    and uploaded to a folder (polylang-homepage) in the plugins folder of the Responsive Theme

    You mean the ‘wp-content/plugins’ directory or somewhere else ?

    Which version of the responsive theme are you using?

    all three strings do not appear at settings, languages, strings translations… (in my first message i confused with site title and tag line)

    yes in de wp-content/plugins directory

    version 1.8.1 Responsive by ThemeID

    https://www.dropbox.com/sh/qxkkjwcdlv4jx27/7hB9w_aiXj

    I have put some screenshots, showing theme, fact that there is both content EN/NL in pages and posts and the translations strings overview. (child theme has unfortunate name Twenty Eleven Child, but is a responsive child…)

    Plugin Author Chouby

    @chouby

    I finally found the issue. Due to the fact that you changed the file name and directory, the code was called before Polylang when it should have been called after.

    I modified the code to suppress this issue, so it should work now (whatever the name of the file and directory)
    http://pastebin.com/0Aw0wDaD

    thanks very much Chouby! works fine.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Resolved] Add custom string translation on Polylang, working with Responsive theme’ is closed to new replies.
Skip to toolbar