This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

oho

  • *
  • 2 posts
How to generate .po and .mo files for a plugin?
« on: January 06, 2023, 04:47:30 PM »
I'm a very new almost user of this really good script.
I have started with installing Osclass for local testing and for the beginning I bought the Beta theme for testing purposes on my local machine.
You know that no matter how many features we already have,we are always in a bad need for more customization.
So I have started learning the very basic things and reading the

How to extend fields article

and at one point , there is this:

Quote
Later, you should generate .mo and .po files for different languages and place them in folders inside the language folder.

Please don't get me wrong, but I'm going to kindly ask a stupid question:

How to generate  .po and  .mo files for a plugin?

*

MB Themes

Re: How to generate .po and .mo files for a plugin?
« Reply #1 on: January 06, 2023, 11:19:00 PM »
You copy PO from English lang folder.
MO is generated on save.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

oho

  • *
  • 2 posts
Re: How to generate .po and .mo files for a plugin?
« Reply #2 on: January 07, 2023, 08:25:51 PM »
Thank you for the prompt response.
My problem was to create the .po files, from plugin source code .
Let's say I would start creating My Very Ultra Special Brand New Plugin in order to add some new features to my site, for example.

Meanwhile, I have figured out that the good, free Poedit v3.1.1 has the option to generate the .po file from source code of let's say
My Very Ultra Special Brand New Plugin .

In Poedit:

File-> New->Set translation language-> Extract from source code.

After that, we can drag the project folder to the Base Path
and drag the excluded files to Excluded Path.
I will try this.
But I have to create My Very Ultra Special Brand New Plugin , first ;)  ;)

Marked as best answer by oho on January 09, 2023, 05:03:21 PM
*

MB Themes

Re: How to generate .po and .mo files for a plugin?
« Reply #3 on: January 09, 2023, 03:45:26 PM »
@oho
Just copy .PO from different plugin and update catalog properties, no need to re-invent wheel.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots