Jump to content

Archived

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

ketri

How to load translations ( language/fi.mo -file) from child-theme, not the parent DMS?

Recommended Posts

ketri

Hi,

 

I'd like to translate my DMS-theme. 
When I use PoEdit and take the finnish translation from DMS Transifex -project and add it to the language-folder of my child-theme, the translations won't work. Only when I delete the language-folder from the DMS-parent theme the translations from my child-theme start working. 
I don't want to edit the DMS-theme of course in any way since updates will destroy any edits.

 

So I'd need a function to my functions.php that would make WordPress use the translation file in my child-theme.

 

Thanks

Share this post


Link to post
Share on other sites
Danny

Hi,

 

I will need to test this myself and if this is indeed correct, then I will have to report it to our developers. Out of interest, what is the name of your language folder ?

Is it

 

/language/

 

or 

 

/languages/

 

?


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
ketri

Thanks Danny.

It's 'language' in the DMS (parent-theme) and in my child-theme. 

 

Hi,

 

I will need to test this myself and if this is indeed correct, then I will have to report it to our developers. Out of interest, what is the name of your language folder ?

Is it

 

/language/

 

or 

 

/languages/

 

?

Share this post


Link to post
Share on other sites
ketri

What's the status here?

Danny

 

I'm still unable to get the translation to work. So I want WordPress to load the .mo file from my child-theme folder. Otherwise and update to DMS (parent theme) will override my translation with a fi.mo file that doesn't have any translations. 

 

So what kind of function can I use to make WP load the translation from my child-theme?

Share this post


Link to post
Share on other sites
Plev

Danny

I have the same problem/request, my situation is very similar to ketri's issue. I am working on slovak translation of DMS theme so i have files sk_SK.mo and sk_SK.po. If I place them to main DMS theme everything works perfectly but in my DMS child theme language folder are ignored. 

 

Another observed issue with translastions and DMS child themes: I have child theme where i use "my-text-domain" then following wordpress codex steps to localize child theme doesnt work either (this time of course i have my .pot file as well with .po and .mo files in folder 'languages' of my child theme) I tried both ways to register text domain (load_theme_textdomain and load_child_theme_textdomain)

 unfortunatelly non of them worked for me, any suggestions? 

 

Looking forward for solution 

Share this post


Link to post
Share on other sites

  • Similar Content

    • DonRicardoRVM
      By DonRicardoRVM+
      ¿Where can  I translate the english items "Orders", "Adress", "Payment Methods". "Edit Account" and "Sing Out"of the my account page of the plugin Quickshop? In the po file they are not.
      I think that it have relation with this error: "Your theme version of my-account.php template', '2.6', 'the latest version, which supports multiple account pages and navigation, from WC 2.6.0".

      I use the Frame Work Pagelines´s Child theme for platform 5.

    • John Olsson
      By John Olsson+
      What's the best way to have multilingual in pl5, any plugin that stands out from the rest and is logical for the pl5-workflow?
    • fabienfons
      By fabienfons+
      Hi,
       
      I'd like to translate my website in french. (platform 5)
      How can i do ?
      Thanks
      Fabien
    • Lisa Haran
      By Lisa Haran+
      Hi 
      I have a map here http://www.iloveoffset.com/maps/
      I want to add several pointer locations to the map, but when I do they do not appear.
      On this map there are 2 pointer locations and as you can there is only one visible.
      Earlier today I added 7 and could only see 4 so there is something odd going on.
      My theme is up to date
    • Audun MB
      By Audun MB+
      Are there any instructions for this? Seems like the plugin use standard .mo/.po for translation, but how do I prevent my language file from being overwritten with updates?
      Support for different number and currency formats in sections is also missing. For me this is an issue with Boxes. I can't use the counter with the current format (thousands separator), it looks really odd in Norwegian (and a lot of other languages). 
       
×