Poedit – NooTheme https://nootheme.com NooTheme Wed, 29 May 2019 04:24:59 +0000 en-US hourly 1 https://wordpress.org/?v=6.3.1 https://nootheme.com/wp-content/uploads/2018/05/favicon.png Poedit – NooTheme https://nootheme.com 32 32 How to translate strings in a POT file https://nootheme.com/knowledge-base/translate-strings-pot-file/ Mon, 29 Aug 2016 02:28:43 +0000 https://nootheme.com/?post_type=ht_kb&p=1007843
Language file of some themes is defined to be POT.
Hint: To detect the difference between PO and POT file, you can refer to this source:
http://betterwp.net/wordpress-tips/create-pot-file-using-poedit/Thus, it certain that you will have to make some minor changes to steps of modifying and translating strings

 

Please follow these steps:
Step 1: Go to themes > theme_name > languages> open POT file> click Create new translation. After that, you will select a translation language in the drop-down list

 

Step 2: After you finish translating, you will go to File> select Save As. There will be a new window that allow you to enter name of the file. As we mention above,  name of the file usually includes two parts such as en_US. The first one is code of language and the rest one is code of nation. If you don’t know the code for your language, please refer to this link:
https://make.wordpress.org/polyglots/teams/
supa82

 

Step 3: The result is that two files including mo and po will be generated in themes > theme_name > languages

 

 

]]>
How to avoid losing edited language files after the update https://nootheme.com/knowledge-base/avoid-losing-edited-language-files-update/ Thu, 31 Mar 2016 02:34:27 +0000 http://nootheme.com/?post_type=ht_kb&p=40995

There are 3 ways for you to avoid losing changes in edited language file:

1.  You can move all language files to wp-content
– The language file of Theme: ../wp-content/languages/themes
– The language file of Plugin: ../wp-content/languages/plugins

2.  To avoid losing the edited files after you update the new version, we recommend that you should install childtheme and move all language files to wp-content/themes/noo- theme_name – child/ languages. Remember to add the following codes to functions.php file in childtheme:

add_action( 'after_setup_theme', 'my_child_theme_setup' );
function my_child_theme_setup() {
load_child_theme_textdomain( 'noo', get_stylesheet_directory() . '/languages' );
}

For example, as for Jobmonster and citilights theme, you will have noo-jobmonster-child and noo-citilights-child relatively.

Learn more about child theme: How to install childtheme
Learn more about translating with Poedit software: Translate and Modify Texts With Using Poedit

3. The safest method is that you save all language files on your computer. After the update, in case you lose files, you will be able to upload them again via FTP.

 

]]>
POEDIT: An efficient tool used to translate or modify phrases of a site https://nootheme.com/knowledge-base/poedit-an-efficient-tool-used-to-translate-or-modify-items-of-a-site/ Fri, 21 Aug 2015 04:40:50 +0000 http://nootheme.com/?post_type=ht_kb&p=14057 You purchased our NooTheme product. You created a website on your own. Then you think that almost everything met your expectation. If users of your website are not English and they cannot read anything there then you will wonder yourself “How can I change language or translate some words, phrases, sentences or even the whole content of my website?” OR you do not like style of writing sentences in the site and want to change it. You have not come up with the answer to these issues yet.

Our instructions below will definitely help you to solve the problem.

Please make sure that there are at least two prerequisites, which must be accomplished prior to starting to translate:

  1. You found languages file of the site you created. It contains a file called en_US whose type is compiled translation. Please seek it in conformity with this direction: themes > theme_name > languages > en_US, with theme_name being the folder name of the theme you bought. For JobMonster, it’s noo-jobmonster.
  2. You installed PoEdit on your computer: you can download this software according to this link https://poedit.net/. After successful installation, the software will support you in opening an available en_US,po file.

Basically, this software will bring two advantages to you. You can modify the way of writing each sentence in the file or you can translate it into other languages.

Note: Before reading these guides below, please remember that we will use languages file in Jobmonster theme to illustrate in this writing.

To rewrite sentences or replace phrases with other ones, please follow these steps:

 Step 1: Open PO file, click a line containing the sentence or phrase you want to make some adjustments. Then this sentence or phrase will be displayed in source text section. One tip given to you is that you can find sentences or phrases easily by using Clt+F or function of “Find” in Edit.

Capture65

Step 2: In translation section, you can replace the chosen sentence with new ones by typing here. You also realize that the new one appears in the line including the old one simultaneously.

Capture67

Step 3: Remember to click Save.

Now you can come back to your site and see the change:

Capture68

 

To convert sentences or phrases to a foreign language, please do the following steps:

 Step 1: Open PoEdit and click Create new translation. A window will appear and you will opt PO Translation files (*.PO) in the box opposite to file name box. Then you will choose en_US PO translation file.

Capture59

 

poedit1

 

Step 2: You can select a new language in Translation Language box and click OK. We take Spanish (Mexico) as an example.

Capture71

Step 3: You will carry out steps similar to ones when you change style of writing above. It means that you click a line> translate the sentence or phrase in translation section> Save. However, due to having chosen a new language, PoEdit will automatically change your file’s name you have just redesigned. Your file`s name usually includes two parts like en_US. The first one is code of language and the rest one is code of nation. If you don’t know the code for your language, please refer to my note below to find it.

In our example, the file will be named es_MX.

Capture67

 

Step 4: The last step you have to do is returning to Admin panel. Please navigate to Settings>general>site language. After that, you can decide on the language you used in file created in step 3. Finally, remember to click Save changes.

Capture38

IMPORTANT:

  • You will need to carry out a further step if the new language is not set up in drop down menu of Site language (admin panel>settings>general>site language).

Please open file wp-config.php. Then in line 36, you will copy and paste name of file just changed into space between quotation marks. See the illustrative image below to better understand.

Capture73

  • You can go to this link https://make.wordpress.org/polyglots/teams/ to see name of file mentioned in step 3. As you see, in this table, the first column from the left is the language you pick to translate, the second one will be displayed in drop-down list of Site language section and the third one is name of file.

Capture51

  • If you try to translate or modify several sentences consisting of $x%, %s or something like that, you will not be allowed to delete these placeholders. You will only be able to change order of them in the translated sentence. These ones will be replaced with data when they are displayed on the website. Thus, you should not bother with this. Please observe the image below to fathom the process:

Capture75

Brief explanation for the image: When the original sentence (unpublished %s job) is displayed on your site, it will be transformed into this one: unpublished 1 job (click button marked by the red circle then you will see “unpublished 1 job” at the top).

Capture79

Yet, you would like to make it different, for instance, 1 unpublished job. With placing placeholders %s into the first position of the phrase, you will obtain your desire:

Then you will go back to your site to view the alteration:

Capture81

  • Please take notice of this: titles of pages or anything belonging to a page will be only translated or changed in Pages section. You cannot translate them by PoEdit.

Let’s take advanced search element in Home job 2 page as a typical example:

The initial title in this section is Join us & Explore thousands of Jobs:

Capture45

BUT now you would like to make some alterations. For instance, it may turn to Become a member and seize job opportunities.

Click edit this element > change title into Become a member and seize job opportunities > Save changes > click Update button.

Next, please come back to Home Job 2 page to witness a new title:

Capture50

• Both your po and mo files must always have the same saved time

supa113

How to merge the edited Po file with new en_US po file that is included in the updated version

After updating version of the theme, you should remember to merge the edited Po file with new en_US po file so that it can ensure that changes will be applied on your site. Follow these steps:
After you make changes to po file (for example, fr_FR po), please click the left button of the mouse on Catalog which is in the menu of the edited fr_FR po file (this menu is on the left top of the file) > opt Update from POT file > there will be a new window > opt PO Translation Files (*.Po) > click the left button of the mouse on en_US po file > opt Select. See the images below:

add po1

add po2

http://imgur.com/a/krB38#8kW10kr

•  Translate/ change texts in language file of plugins

If you edit texts in the language file of our theme`s plugin, there will be a minor change to the way you give a name to the file. When you go to plugins folder, you will see the default name of the language file, for example, noo-menu-en_US.pot. After you change strings in English (United States) and Save the file, its name will be noo-menu-en_US.po instead en_US.po.

p7

     ♣  Related link: How to avoid losing changes in language file after the update

]]>