Skip to:

Opened 15 years ago

Closed 15 years ago

#137 closed defect (bug) (fixed)

To work activity for universal languages

Reported by: iprashant's profile iprashant Owned by:
Milestone: Priority: major
Severity: Version:
Component: Keywords: activity patch for local languages to work


I wanted activity should display in local languages also.
So i have updated

  1. /bp-activity/bp-activity-templatetags.php
  2. wp_bp_activity_sitewide table

Updates are as follows.

here because of local language when we create post, url getting converted to utf so its long text with stings and special chars. In the formation of site wide activity string, sprintf is used so it is not allowing big utf type url.

In function bp_activity_content_filter
I commented $content[0] .= '%s';

and in function bp_activity_insert_time_since
return sprintf( $content, ' ' . bp_core_time_since( strtotime( $date ) ) . ' ' . ('ago', 'buddypress') );

replaced with

return $content . sprintf( "%s", ' ' . bp_core_time_since( strtotime( $date ) ) . ' ' . ('ago', 'buddypress') );

  1. In "wp_bp_activity_sitewide" table updated "content" field to "utf8_general_ci"

This is for site wide activity to work with local languages.To work activity on profile page make changes with related table to user_activities. For getting it work on profile page change char type of tables


for all above tables common column is "content" change it to utf8_general_ci to work with other languages.

Attachments (1)

bp-activity-templatetags.php (5.4 KB) - added by iprashant 15 years ago.
patch for activity to work with local languages

Download all attachments as: .zip

Change History (2)

15 years ago

patch for activity to work with local languages

#1 @apeatling
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed, thanks.

Note: See TracTickets for help on using tickets.