Multilingual Setup
SportsPress is fully compatible with WPML which makes it easy to run a club or league site in multiple languages. All post types, taxonomies, and options can be translated with the help of the WPML plugin.
A multilingual setup of SportsPress can be seen in action on the WPML test site.
Required Plugins
To install multiple languages on your SportsPress site, you’ll need to have the following plugins installed and activated.
- WPML 3.0 or above
- WPML String Translation 2.0 or above
- WPML Translation Management 1.9 or above
- WPML Media Translation 2.0 or above
- SportsPress or SportsPress Pro
You can get all WPML components from your wpml.org account under Downloads.
SportsPress is hosted in the WordPress plugins repository, and SportsPress Pro is available through sportspresspro.com.
Installation
Once you’ve downloaded all of the required plugins, go to Plugins > Add New. Click the “Upload” link near the top and upload each plugin from your computer. Be sure to activate each plugin once it has been installed.
You can check that all plugins are active by clicking on WPML in the admin menu. You should see submenu options for Translation Management, Media Translation, and String Translation. You should also have SportsPress as a top-level menu option in the admin sidebar.
Translating Terms
SportsPress uses custom taxonomies to organize its data. Taxonomies generated by SportsPress include leagues, seasons, venues, positions, and roles. You can translated all of these using WPML.
First, create the leagues, seasons, venues, positions, and roles. Use the standard SportsPress interface, and be sure to choose the default language under the Language section at the bottom.
Now, start adding taxonomies in the second language. When adding these, select the language of the translation in the Language section and choose the original term that this one is a translation of.
Translating Content
Events, teams, players, staff, and sponsors are custom post types generated by SportsPress. The title, content, and attributes of each of these can be translated easily using WPML.
First, create everything in the default language as you normally would. Don’t worry about translating them just yet.
Once you’ve created all of the content, it’s time to translate everything. Use the Language section to translate each post. You can add a new translation or edit an existing one from here. You can also choose to duplicate uploaded media and featured images to the translations.
Calendars, league tables, player lists, and staff directories are also stored using custom post types and can be translated in the same way. When a translation of an included post (for example, teams in a league table) are available, the translated version will automatically be displayed.
Translating Variables
All variables and equations in SportsPress are configured from the Configure section in SportsPress settings. Similar to translating content, these variables can also be translated using WPML.
Edit each event outcome, team result, player performance, table column, player metrics, and player statistic and add translations where needed. If the variable name is the same as the original language, a translation is not required. SportsPress will automatically use the default language in this case.
Translating Page Slugs
WPML allows you to create unique URLs for content in each language, including the slugs and names of post types.
The default URLs for custom post types in SportsPress will look like:
- /event/123/
- /calendar/fixtures-results/
- /team/essendon-eagles/
- /table/season-standings/
- /player/mario-bellucci/
- /list/first-team/
- /staff/bobby-brown/
- /directory/club-staff/
- /sponsor/themeboy/
The first part is the post type and the second part is the page name.
Staff Directories and Sponsors are only available to Club or League License holders.
Page names can be translated by clicking on the Edit button next to the permalink field in the post editor. WPML uses different posts for each language, which means you can set their names individually.
See Translating Page Slugs for more information.
Translation Management
Using the WPML Translation Management plugin, administrators can assign translators to specific areas of the site.
To turn WordPress users into translations, go to WPML > Translation Management, then click the Translators tab. From this tab, click “Add translator” or edit an existing translator.
Each translator can be designated to edit language pairs by choosing a language to translate to and from. Translators can only edit translations in their designated language pair.
To choose content types for translation, click on the Multilingual Content Setup tab on the Translation Management page. From here, you can choose the fields, posts, and taxonomies that can be translated.
See Using WPML’s Translation Management and Translation Management Features for more information.