Skip to content Skip to main menu Skip to utility menu

Translation

Home Forums GovIntranetters Translation

Tagged: ,

This topic contains 14 replies, has 8 voices, and was last updated by  Patrik Hamberg 1 year, 6 months ago.

  • Author
    Posts
  • #1360

    Geert
    Participant

    How do I translate ?
    Where do I find instrcutions ?

  • #1547
    adMJU
    adMJU
    Participant

    I’d also like to translate some of the terms used. Some of it I could easily (names in the widgets sections, names of pages, menu names, names of the pages…), some are more difficult (php templates). I wouldn’t want to change the php files, while a new version of the theme would override the changes. But there are other options as with other WP themes. Perhaps the creators of the theme can help?

  • #2032

    Frederic Beck
    Participant

    I have set up a development site to prepare an Intranet for my employer. While I can create most of the content in German, many phrases are hard coded in English (“Search”, “Search in:”, “Browse by category”, “Browse by tag”, also the name of the month in the little calendar pictogram “OCT”, etc.).

    Also, post and event dates seem to display as “j M Y” or “l j M Y g:ia”, ignoring the setting under General Settings. However, dates and times for comments display according to this setting. I typically use “Y-m-d H:i”.

    For the meantime I’m toying with the idea of making a child theme and changing all the English phrases into German, but then I was thinking that just about the same amount of effort could turn this theme translation-ready for anyone.

    I would like to help with internationalizing this theme. How do I start?

    • #2041

      Luke Oatham
      Keymaster

      I have started to make changes to the theme templates files.

      This is very much work in progress, but please see our new GlotPress translation area

      I’ll need some volunteers to help with validation. Please let me know if you’re interested.

      Get in touch if you’d like a new language set.

      Luke

  • #2040

    Luke Oatham
    Keymaster

    Hi all

    The theme is based on initial bespoke development for part of the UK Government. Since open sourcing the theme, we’ve made a few steps in bringing the theme back to core standards, but there’s a long way to go.

    Dates and times are on the roadmap for future enhancements.

    So far we have not had any requests from clients for translation so this development is unlikely to be funded as part of ongoing client development.

    Translation is something that I would personally like to build into the theme. It will require changes to most of the templates, widgets and functions in the theme. It’s a big piece of work for the templates alone, and then the language files will need to be created.

    I’d be happy to collaborate on github to integrate the translation changes: https://github.com/helpful/govintranet

    Let me know if you’re interested!

    Luke

  • #2049

    Frederic Beck
    Participant

    Thanks for setting this up. I enjoyed adding the German translations for your Theme!

    Recommendation to add a %s placeholder to the string in functions.php in line 9506:

    $link = str_replace($reply_link_text, 'Reply to ' . $author, $link);

    for languages where the author’s name might not come after “reply to”.

  • #2050

    Luke Oatham
    Keymaster

    Thanks a million Frederic!

    I am only part way through making changes to the templates, so there will be more entries for translation coming soon.

    This is a great start and I’ll compile the work so far and upload to the repository this weekend.

    Luke

  • #2057

    jaylopez
    Participant

    Here is the first translation for Spanish (Puerto Rico es_PR) with 100% completion for version 4.7.1. This can be used as a base for other Spanish variants. I will keep enhancing the translations as I see how they show and make sense on the actual website.

    I use PoEdit to edit with cloud support besides manually, so I could not include them one by one on the Glotpress site. If anyone can upload them there that will be cool.

    Jay

  • #2073

    Frederic Beck
    Participant

    I notice a new directory languages in the repository; I am not 100% certain where this needs to be copied. Are the .DS_store files necessary or just MacOS rubbish?
    Am I correct to assume that the .po and .mo files within languages/themes/ are meant to be placed within the very govintranet/languages/ directory?

    Also, is there an easier way to install your updates? I currently git clone the repository to a temporary location, then cp -R the files from each of the three directories to where they need to go within wp-content/.

    • This reply was modified 1 year, 12 months ago by  Frederic Beck.
  • #2199

    Thomas Graenge
    Participant

    Hi,

    I can help with a danish translation 😉

  • #2248
    Pedro Meireles
    Pedro Meireles
    Participant

    Hello,

    I can help with the portuguese translation.

    Best regards,
    Pedro

  • #2254

    Luke Oatham
    Keymaster

    Hi all

    Many thanks for all your contributions to the translation set.

    I include the .po and .mo files in the /languages folder on github. You need to copy these to your /wp-content/languages/themes/ folder.

    The languages folder within the govintranet theme should only contain the .pot file that comes with the theme.

    As the theme and plugins are regularly updated, I’ll keep the translation files up to date in github and will release updates to the GlotPress site accordingly. This means that new translation terms will be required from time to time, and some old terms will be removed or changed.

    Most of the front end templates and plugins are now translation-ready. Please let me know if you see anything that I’ve missed.

    However, it looks like there are some problems in the admin interface such as the Options pages where the translations don’t work. Initial research suggests that translation is only supported for the “theme” files – that is the front end templates and plugins, but not for the admin interface as is this not part of the theme and is handled directly by WordPress. For the custom elements of the admin interface such as the Options page and any custom fields in the custom post type editing screens, the theme translation files aren’t used.

    I’ll continue to look into this and would appreciate any help if anyone has any ideas.

    Luke

  • #2255

    Patrik Hamberg
    Participant

    If I have an english version of the theme installed and active and want to switch to another language, how do I go about this?

    • #2256

      Patrik Hamberg
      Participant

      Problem solved. One of the language files were broken. New download/upload solved my issue.

You must be logged in to reply to this topic.