Support » Theme: Kadence » Translating into Polish

  • hey,

    My website is in Polish. I would like to show some meta data on my archive and single post pages with regards to comments. The problem is this meta data is in English only. So it says something like “5 comments” in English instead of Polish. I used a software called Poedit to create a translated pl_PL.mo and pl_PL.po files for the Polish language and added them to:

    wp-content->theme->kadence>lanugages

    In this folder there were some other translated .mo and .po files for different languages with the exception of the Polish language. So I added them for Polish language. It works great….until the next theme update (when pl_PL.mo and pl_PL.po disapear again).

    Is there any way I can upload them into the above folder and make this change permanent?

    I would appreciate your help. Thanks!
    Marius

Viewing 5 replies - 1 through 5 (of 5 total)
  • hannah

    (@hannahritner)

    Hey,
    You just need to use a child theme. You can download one from here: https://kadencewp.com/child-themes
    Hope that helps!

    Best,
    Hannah

    Thread Starter jsnaxx

    (@jsnaxx)

    Hey Hannah,

    Thanks for your feedback. I just recently uploaded your child theme.
    Now the theme folder contains two folders: kadence child and kadence.

    The kadence child folder contains only functions.php and style.css files. So in order to add my translated .mo and .po files to my child theme I copied the languages folder from the main theme kadence wp-content->themes->kadence->languages (with added pl_Pl.po and pl_PL.mo files) into the child theme.

    The child theme folder has now functions.php, style.css and “languages” folder copied from the above path. But this is not working. When I saw a new theme update message in the dashborad and updated the theme I lost my translation again.

    Do I need to modify the functions.php file to make this change (adding languages folder to the child theme) effective or did I something wrong?

    Many thanks!

    hannah

    (@hannahritner)

    Hi,
    Try pasting the languages code into your functions.php. Does this work?

    Kindly,
    Hannah

    Thread Starter jsnaxx

    (@jsnaxx)

    Hi,

    I don’t have any code. It’s nor working. These are languages files (.mo and .po). The kadence theme supports some languages like German or French but not Polish. In case of German there are de_DE.mo and de_DE.po files in the folder wp-content->theme->kadence>lanugages. So every theme update doesn’t affect these languages files for German.

    I created pl_PL.mo and pl_PL.po files in the same folder for languages and it works great but only till the next update. Once updated these pl_PL files disappear as they are not “permanent” part of the theme (as this is the case with the German language for example).

    So I have created a child theme (in child theme there are only two files: functions. php ans styles.css. I added there a folder: languages with translated pl-PL.mo and .po files. But the theme is not reading it. I think I should add a snippet of code to functions.php which will basically tell the theme to load these language files from the child theme but I can’t code. Is there anybody on your site who knows how to integrate these language files into the child theme?

    Thanks!

    • This reply was modified 6 days, 10 hours ago by jsnaxx.

    Hey,
    First I suggest you submit your translations to be added: https://translate.wordpress.org/projects/wp-themes/kadence/

    That way everyone can benefit from them and that would be handled by WordPress and you wouldn’t need to do any file management.

    If instead, you want to manage this yourself my suggestion is to use this plugin: https://wordpress.org/plugins/loco-translate/

    This plugin don’t add anything to your site performance and will handle translations for you and save them in a folder outside of the theme folder structure so they are not removed when there is an update.

    If instead you really want to do this through a child theme where you handle all the compiling you can use this function: ‘load_child_theme_textdomain’

    See here: https://developer.wordpress.org/reference/functions/load_child_theme_textdomain/#user-contributed-notes

    Ben

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.