Notifications
Clear all

wpForo 1.x.x [Closed] XML file in translation

12 Posts
3 Users
0 Reactions
1,865 Views
Posts: 9
Topic starter
(@pluginnovation)
Active Member
Joined: 5 years ago

Hi There, 

We would like to add a language through the XML import method.  Is there a template or format we should follow to create the content?  Kindly advise.

Cheers, 

Brian 

Topic Tags
11 Replies
Posts: 9
Topic starter
(@pluginnovation)
Active Member
Joined: 5 years ago

Hi, 

We have converted the .po file to .xml format.  However, the system returns a "Can't add new language" error.  Attached it the XML file we uploaded. 

Could you please guide us what is wrong with it?

Cheers, 

Brian 

10 Replies
Sofy
 Sofy
Admin
(@sofy)
Joined: 6 years ago

Support Team
Posts: 4565

@pluginnovation

wpForo Forum language is based on WordPress language set in Dashboard > Settings > General admin page. You should only use the XML Language selector if you’ve created different language XML’s and uploaded in wpForo phrase system.

Please read this doc: https://wpforo.com/docs/root/wpforo-settings/general-settings/#xml-language

(@pluginnovation)
Joined: 5 years ago

Active Member
Posts: 9

@sofy

Noted with thanks.  We would like to keep the site language in English while upload a XML for Chinese.  Believe we should use the XML in this case?

But the system returns an error while uploading, do you know what went wrong?

Cheers, 

Brian 

(@pluginnovation)
Joined: 5 years ago

Active Member
Posts: 9

Hi Sofy, 

Could you please guide us through?

Cheers, 

Brian 

Sofy
 Sofy
Admin
(@sofy)
Joined: 6 years ago

Support Team
Posts: 4565

@pluginnovation,

Sorry for the late response Brian,

1. you should download the english.xml file in the /wp-content/plugins/wpforo/wpf-admin/xml/ folder

2. rename it and translate it. Make sure the syntax is the same

3. then upload the file using the option you've mentioned.

(@pluginnovation)
Joined: 5 years ago

Active Member
Posts: 9

@sofy

Thank you sofy.  We have downloaded the English file. 

In order to update the content to another language, should we update the text after phrase name="xxx" only or as well as the one in the bracket behind CDATA?

<?xml version="1.0" encoding="UTF-8"?>
<language name="MASTER" language="English" encoding="UTF-8" version="1.0.0" code="en">
<phrase name="%s and %s liked"><![CDATA[%s and %s liked]]></phrase>
<phrase name="%s liked"><![CDATA[%s liked]]></phrase>
<phrase name="%s, %s and %s liked"><![CDATA[%s, %s and %s liked]]></phrase>
<phrase name="%s, %s, %s and %d people liked"><![CDATA[%s, %s, %s and %d people liked]]></phrase>
<phrase name="AOL IM"><![CDATA[AOL IM]]></phrase>
<phrase name="About Me"><![CDATA[About Me]]></phrase>
<phrase name="Access add error"><![CDATA[Access add error]]></phrase>
<phrase name="Access delete error"><![CDATA[Access delete error]]></phrase>
<phrase name="Access edit error"><![CDATA[Access edit error]]></phrase>

Cheers, 

Brian 

 

Sofy
 Sofy
Admin
(@sofy)
Joined: 6 years ago

Support Team
Posts: 4565

@pluginnovation,

Please see the example below: 

<phrase name="%s, %s, %s and %d people liked"><![CDATA[%s, %s, %s and %d people liked]]></phrase>

the words that should be translated are marked red: 

<phrase name="%s, %s, %s and %d people liked"><![CDATA[%s, %s, %s translated_and %d translated_people translated_liked]]></phrase>
(@pluginnovation)
Joined: 5 years ago

Active Member
Posts: 9

@sofy

Thank you sofy.  We have updated the XML file, however, the system does not reflect any new upload file. 

The original "Chinese" file was a testing file with incomplete information, and it still displays even we deleted from the database.  

Could you please advise what is the potential reason why the new file does not reflect?

Attached is the language file with complete data for reference.

Cheers, 

Brian 

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10544

@pluginnovation

Before uploading the XML file you should edit the second line and set your language values:

<language name="MASTER" language="Chinese" encoding="UTF-8" version="1.0.0" code="zh_CN">

After uploading the xml file, select the new language and save the options. Then navigate to Dashboard > Forums > Dashboard and click on the [Delete Phrase Cache], don't click the [Rebuild Phrases] button.

(@pluginnovation)
Joined: 5 years ago

Active Member
Posts: 9

@robert

Thank you Robert.  The method works, however, there are a few phrase left which we have no idea where to update.  Could you please guide us through? 

1)  The navigation on the top 

2)  The Peepso related translation

Kindly find the attached screenshot.

Cheers, 

Brian 

Sofy
 Sofy
Admin
(@sofy)
Joined: 6 years ago

Support Team
Posts: 4565

@pluginnovation

wpForo menu is a regular WordPress menu. In Dashboard > Appearance > Menu admin page wpForo creates new navigation menu called “wpForo Navigation (wpForo Menu)” and attaches this menu to wpForo Menu location. Here you can  customize and translate all menus.