IvanSCM

Language as gettext PO/MO files

Recommended Posts

JSON files is bad. Need a convenient method of translation.

Share this post


Link to post
Share on other sites

Why is JSON bad? It doesn't get much more convenient than PWs way of translating strings. You edit them right inside PW, under Setup > Languages > click on a language, then choose the language, and select a JSON and hit "edit" - you'll see text input fields for each string. No need to directly touch and edit the JSON file with a text editor.

Share this post


Link to post
Share on other sites

There's lots of tooling and services available for po/mo files though. People might not want to translate things manually if there are ways to outsource or automate that task. So not needing to touch the JSON files is not necessarily an advantage.

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

ProcessWire's translation is based on gettext, so using po/mo as alternative to the json files we currently have should be quite possible. Afaik it should even be possible to convert between both formats. 

2 hours ago, IvanSCM said:

Simple tools = PoEdit, https://glotpress.blog/

Those are certainly nice and I'm using PoEdit for other projects, but we should not forget that processwire ships with online translation handling in core. If you need collaborative web based translation you're already covered.

Share this post


Link to post
Share on other sites

In the processwire backend you can already do the translation. There's not need for an external tool to add online translation. 

Share this post


Link to post
Share on other sites
On 9/19/2018 at 3:33 PM, LostKobrakai said:

In the processwire backend you can already do the translation. There's not need for an external tool to add online translation. 

I do not mean just another tool. I mean the convenience of teamwork on the translation. This will allow to have always the actual translation into the desired language, by the community. And, accordingly, will help popularize your favorite system.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By cosmicsafari
      Hi all,
      Thought I had the language translation working but now when I attempt to access the language through the backend (Setup > Languages > My Language) it throws an error:
      Recoverable Fatal Error: Argument 3 passed to ProcessWire\LanguageTranslator::textdomainTemplate() must be of the type array, null given
      Can anybody shed any light on what would cause this error when trying to access my language through the settings in the backend, or attempting to view it on the frontend with its language specific URL.
      The only thing I have changed recently was moving the DB to a different location however the one exported was the one that I previoulsy had my custom language working on it previoulsy.
      Any ideas, im at a bit of a lose as to what would have caused this when it was working previously.
       
    • By franctic-aerobic
      Here's my Norwegian language pack for ProcessWire. I've been adding translations over some time, to suit my own projects users needs.
      Last updated:
      2017/10/02
      Status:
      Not yet complete. Translations that non-superusers will see is prioritized.
      Name:
      ProcessWire-Norwegian-Language-Pack-nb-NO
      Translated using:
      ProcessWire 3.0.77 dev
      Number of files:
      177 wire files and 68 site files – ranging from just started to completely translated. The site files includes translation some free and some pro modules, see the complete list in the README.md at GitHub.
      Available at GitLab:
      https://gitlab.com/franctic-aerobic/ProcessWire-Norwegian-Language-Pack-nb-NO
    • By Eunico Cornelius
      Hi, I am new to process wire and I've been trying to change the date time format in my webpage according to its language selection(example: English 'd/m/y' , Deutsch: 'd.m.y'). I know that using 
      $datetime->getDateFormats(); we can achieve the type of formats in the shape of indexes. Also, by using 
      $user->language->id we can know which language we are using. How do I combine this two functions so that when I select English/Deutsch, the date will be adjusted accordingly?
      Is there a specific function that can do this or is there any provided index in the $user->language somewhere. Thanks in advance :).
    • By SeoGuy
      Does anyone here have experience installing a translation module that creates new pages for multiple languages?
      I am assuming when these pages are generated, they are indexable by google as "new" and "fresh."
      Thoughts?
    • By helmut2509
      Hello,
      I am just working on a multi-language pw app. Default language is german, then comes english.
      the language segment for english in the url is 'en-home' , eg. '../en-home/products', I think this was taken as a default option.
      (this happened several months ago, so I do not remember exactly...).
      Now I want to change this segment simply to 'en'. However, in 'Pages...Settings', only the part AFTER 'en-home' is editable, so I do not see any possibility
      to change this segment. Neither do the Languages Settings offer such a possibility ;-((
      Or do I miss something?