Jump to content

Archived

This topic is now archived and is closed to further replies.

selmakdesign

404 page and blog - cannot translate to other language

Recommended Posts

selmakdesign

My website is in Swedish and I've installed the Swedish WordPress version so all frontend text should already be in Swedish, except it's not. What I'm referring to is the text on the 404 page, the search button, read more button, blog text and some email templates (some of the blog text is in Swedish while some in English!).

 

translate_blog.png

 

translate_404.png

 

translate_email.png

 

So I've tried your translation tutorial, I've used the Pagelines customizer plugin and typed in stuff manually and added via ftp. But first of all, not everything is included in these language files, and second it's not translated a thing.

 

So how to I translate these bits to Swedish??

 

 

Share this post


Link to post
Share on other sites
Danny

Hi,

 

To translate DMS, see our documentation here - http://answers.pagelines.com/Customization/how-to-translate-a-pagelines-theme

However, the last image in your post above, where is that coming from as I do not recognise it being anywhere in DMS ?


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
selmakdesign

In regards to the link you sent, it's suggesting to install a child theme. Now I must admit, this is my first child theme attempt! I've installed skeleton advanced and so far I've copied over all my custom css into the style.less file. But how do I save my custom scripts in the child theme (see image)?

 

When switching to skeleton the basic settings are all there (canvas background for example) but the actual content is gone, mediaboxes are in place but empty and so on. Is there any way I can export all my front end settings to skeleton or do I have to do it all manually?

 

I'm thinking it's probably better get things right now before the next update is due ;)

 

As always very happy and grateful for any help (this is such a learning curve) :)

Share this post


Link to post
Share on other sites
selmakdesign

By the way, I realized the last image of my first comment came from jetpack! And here's the image I intended on posting in the previous comment:

 

childtheme.png

Share this post


Link to post
Share on other sites
selmakdesign

And my next question is: I've found 4 words in the po file that I've added the translation to (everything else is back-end stuff and not interesting for translation), where is the rest??? Missing from the po file are the remaining front end blog words, "read more", "search" in the search bar and the wording in the 404 file

 

Here's what's included:

 

translate1.png

 

And missing:

 

translate_blog.png

 

translate_404.png

Share this post


Link to post
Share on other sites
selmakdesign

Another update, some things solved, some new issues:

 

So I've actually managed to translate most of it now, and NOT by using the language files as suggested by the tutorial in your link. It took a lot of brain gymnastics (should it really be this hard?????) but there it is, most of the blog stuff translated and even the 404 page, BUT

the translation only worked when overwriting the section.php files in DMS, NOT in the child theme

 

translatestage3.png

 

Aren't the files supposed to have the same hierarchy in the child theme as in DMS?

 

The wordings I haven't got the translation for are in the sidebar: Popular, Recent, Comments, Tags. And also Search in the search bar.

 

I've tried adding the translated po mo files and they do translate, but not the above mentioned!! So are they hiding in some php file somewhere?? If so where??

 

Perhaps it would be a good idea to make EVERYTHING available for translation through the mo file, just a suggestion for the next update.

Share this post


Link to post
Share on other sites
Danny

Looking at your screenshot, I am completely at a loss as to why you have downloaded my Skeleton child theme and then added a DMS folder to it ? You do not need to do this, skeleton is already setup with its directory structure and there is no need to change that structure at all. What you have now is likely not even considered a child theme anymore.

 

Also, not sure what you mean by this statement - BUT the translation only worked when overwriting the section.php files in DMS, NOT in the child theme

 

Please refrain from editing core files, as this voids all support we can provide as we do not recommend nor support edits of core files.

 

Can you upload the .po files you have added your translations too, so I can test this myself please.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
selmakdesign

From an ex Londoner to a fellow Englishman, there's no need to be cheeky!

 

In the main theme DMS this is the structure of the folders:

 

themes/dms/dms/sections/postloop/section.php

 

so here's what I did:

 

themes/skeleton-advanced/dms/sections/postloop/section.php

 

You see what's going on here? Inside the theme folder dms there is another dms folder that then leads to the file I've edited, namely section.php. That's why I've added a dms folder to the child theme, to stay true to the structure of the parent theme as I've read somewhere that's how it's done. Each edited filed needs to sit in exactly the same folder structure in the child theme???

 

I also knew you'd get upset about editing core files. Don't worry I won't ask for your support on that one, I edited the core on my testing server to see if it works at all since I didn't see the changes to the child theme.

 

Conclusion: So all you telling me to ditch the second dms folder leaving me with this structure:

 

themes/skeleton-advanced/sections/postloop/section.php

 

??

 

And to my other questions (see previous comments in this thread):

 

1. Any advice on how to translate those other bits I've mentioned??

 

2. In the child theme, how do I save the script I've added to the DMS theme so it doesn't get lost on update (see screenshot in previous comment)?

 

Please don't send me another translation tutorial link, it's not in there ;)

Share this post


Link to post
Share on other sites
selmakdesign

In regards to uploading the po files:

 

Since my website is in Swedish, doing a manual translation is completely unnecessary. I have installed the Swedish wordPress version which comes with a complete translation, including all blogpost wordings as far as I could see. So all the words that aren't translating are included so my conclusion was that there are files in the DMS theme that are overwriting the po translations. And that how I came to translate whatever text I could find straight in the section.php files of the sections. 

 

Find attached the original po file that comes with Swedish WordPress:

 

https://dl.dropboxusercontent.com/u/21907645/sv_SE.mo

 

https://dl.dropboxusercontent.com/u/21907645/sv_SE.po

Share this post


Link to post
Share on other sites
Danny

I admit I'm a cheeky chap :p However, I wasn't mean't to be cheeky in my post above.

 

In regards to your child theme structure, the Skeleton theme is structured correctly out of the box, there is no need to add a DMS folder to it. If you do this and do it correctly, you actually create a core theme instead of a child theme, its the same process that PinsPro, iBlogPro 6 etc... use.

 

I don't think you want to create a core theme and therefore, you will want to remove the dms folder from Skeleton, as it isn't needed. Also, the structure you mention above i.e. themes/skeleton-advanced/sections/postloop/section.php is correct.

 

1. If you're unable to locate any of the phrases you point to in your screenshots in PoEdit, then it may well be that they're not in the current .po file of DMS. Therefore, it may need updating to include all new strings. I will speak to our developers and see if this is the case.

 

2. The script can be added to either the DMS Toolbar > Custom > Custom Scripts editor or you can add it to your child theme files via the functions.php file. To add a script to the functions.php file, you need to use the WordPress enqueue function, see here - http://codex.wordpress.org/Function_Reference/wp_enqueue_script

 

I prefer to use the enqueue script function instead of adding scripts to the custom scripts editor.

 

 


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
selmakdesign

No bother, we all have our moments ;)

 

A follow-up to your reply:

 

I'm now using the correct structure, i.e. themes/skeleton-advanced/sections/postloop/section.php  but the translations in the file are not showing on the website (whereas they did show when I tried it out directly in the dms theme on my testing server) So something's obviously gone wrong here... any ideas?? See below a screenshot from filezilla and from the website showing the English text again.

 

sections.png        sectionstransl.png

 

1. That would be great for anyone not having wordpress available in their own language. Unfortunately the problem doesn't stop there. Since I have the fully translated .po file already in my swedish wordpress version with ALL FIELDS INCLUDED yet not translated they are being overridden by template files of the dms theme such as the ones I've included in the child theme. So a full translation tutorial to include these files is actually of great importance! Even better would be if the next version of dms2 would not require editing php files in order to translate ;)

 

But until then, do you know in what location and file I can locate the remaining sections as mentioned before: 

 

Popular, Recent, Comments, Tags. And also Search in the search bar?????

 

2. Thanks I'll be giving it a read and try :)

Share this post


Link to post
Share on other sites
Danny

I have spoken to our developers and they're going to be investigating this, as it may be an error.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
selmakdesign

Any news on the translation. I can't invoice my client until the translation is done!!

Share this post


Link to post
Share on other sites
Danny

There is no news at the moment. As a band aid, I think the best course of action would be for you to create a child of any sections you're having issues with and edit the phrases there.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
selmakdesign

Am aware of the need for a band aid. Please see my previous comment. I've translated all I could find but it's not showing in the child theme (it did show when I had changed the core in the main theme on my testing server) and I couldn't find everything and I'd asked you where to find the missing bits!!

Share this post


Link to post
Share on other sites
Danny

You're going to need to copy the PostLoop section, RapidTabs and unfortunately, as far as I am aware the Search placeholder can not be applied via the band aid as it isn't in a section.

 

Read more you can change this in the class.post.php file line 37 I think.

Posted on line 248

In regards to the Popular, Recent etc.. they belong in the RapidTabs section, so I recommend you open the directory of RapidTabs in a code editor such as Atom.io and then search for those phrases.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
selmakdesign

I'll try these out. Any idea as to why the changes in the sections aren't showing on the website that I've already applied to the child theme. Like I mentioned previously, it worked perfectly when applying to the main DMS2 theme, but now in the child the already translated sections aren't showing on the website. See below structure as per our previous discussions. The section folders contain the edited files with my Swedish translations.

 

sections.png

Share this post


Link to post
Share on other sites
Danny

Make sure when you have made your changes that you have clicked on the DMS Toolbar > Add to Page > Reload Sections button.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
selmakdesign

Yep, that worked! Have finally invoiced my client. I look forward to the update with the translation issues fixed!

 

Thanks!

Share this post


Link to post
Share on other sites
Danny

AwesomeSauce!

And yeah, in regards to this band aid we apologise for any inconvenience this may have caused.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • DonRicardoRVM
      By DonRicardoRVM+
      I need to translate the quickshop plugin to spanish, but I can´t do it. I edit the pot file, and compile the spanish translation in es_ES.mo and es_ES.po, bu it doesn´t works.
      Pleasu, could somebody help me?
    • Kedark
      By Kedark+
      Hello, when you update the DMS to the latest version 2.2.4, unfortunately, does not work translation theme. Has anyone encountered this? It looks as if the file with the translation was not read .. everything is in the original language. (Wordpress is also updated to the latest version)
      Help....
      RKA
    • DonRicardoRVM
      By DonRicardoRVM+
      HI!
       
      First of all, sorry for my bad english.
       
      I have a problem that I never could solve: I can´t translate the words "READ MORE" in the loop. Where must I translate them?
       
       
    • thwarted
      By thwarted
      Folks,   We're adding the finishing touches to an iBlogPro v1.2 site and have come up against a small issue with the Translate Content on Scroll style for Canvas Areas:   [Canvas Area] > Area Styling > Scrolling effects and sizing > Translate Content on Scroll   It creates a pleasingly modern appearance BUT when the browser is windowed and set wider than it is tall, the parallax effect causes the Canvas contents to fade and become obscured by the next object down the page moving up when you start scrolling. Even when the browser window is made taller, the object below begins its transition up the page far too early, leaving the bottom part of the Canvas always obscured and never visible.   I was wondering if this effect had any UI properties or other configuration? I don't mind editing the code that makes it work, but would rather have some pointers from you guys first.   (Incidentally I have no way of knowing precisely what version of DMS I'm using. Is there an 'about' page detailing everything I have installed? I've seen plenty of references to DMS 2 but the only version I can find by looking at the theme entry is iBlogPro v1.2.)
    • ketri
      By ketri
      Hi!
      I'm having two problems with my translations. I've shown them in this video:
      https://www.youtube.com/watch?v=Bq2jXeHbd7o
       
      1. When I click edit from any element on page, it's very slow and laggy. If I remove the translations from the themes it then works normally. Why does translation affect this?
      2. My site is using the translation files from the DMS parent theme. The translations in my child theme (western-spirit) only work if I delete the translations from the DMS parent theme. I tried different functions in my child-theme to make it load the translations from there but they didn't work. I tried these:
      function my_child_theme_setup() {load_child_theme_textdomain( 'Western Spirit', get_stylesheet_directory() . '/languages' ); } add_action( 'after_setup_theme', 'my_child_theme_setup' ); and 
      load_theme_textdomain( 'dms', get_stylesheet_directory() . '/languages' ); I also noticed than in these functions for example here http://codex.wordpress.org/Function_Reference/load_child_theme_textdomainthey always have /languges but DMS-theme has /language without the "s".
       
      So I want to edit my site without the weird lagginess that appears when I have translations and I want to use the latest translations from Transifex on my child-theme so my translations won't disappear when I update DMS
       
      Thanks!
×