(858) 586 7777 | About | Testimonials | Contact
vteams vteams vteams vteams
  • How does it work?
    • Startup Process
    • Your First Day
  • Technologies
    • Hire PHP Developer
    • Hire App Developer
    • Hire JavaScript Developer
    • Hire ROR Developer
    • Hire IOS Developer
    • Hire .NET Developer
    • Hire AI Developer
    • Hire Robotics Engineer
  • Sample Budgets
  • Meet The Team
  • Experiments
  • Captain’s Log
  • Blog
vteams vteams
  • How does it work?
    • Startup Process
    • Your First Day
  • Technologies
    • Hire PHP Developer
    • Hire App Developer
    • Hire JavaScript Developer
    • Hire ROR Developer
    • Hire IOS Developer
    • Hire .NET Developer
    • Hire AI Developer
    • Hire Robotics Engineer
  • Sample Budgets
  • Meet The Team
  • Experiments
  • Captain’s Log
  • Blog
Blog
  1. vteams
  2. Blog
  3. WPML – WordPress Multilingual Implementation
Mar 24
wpml-wordpress-multilingual-implementation (4)

WPML – WordPress Multilingual Implementation

  • March 24, 2017

vteam #453 has been working on the project of a community website. The aim of this project was to incorporate international language support according to WordPress standards using the BuddyPress plugin. The WPML plugin was used to provide multilingual functionality to the site.

WPML includes features like WPML String Translation and a core Translation component that supports all international languages and can be customized with custom themes and integrated plug-ins. However, many challenges were faced; the most predominant being the need for high levels of customization and the difficulty involved in the integrated plugins being used on the site already.

vteam #453 formatted all the possible strings with the __(“string to translate”,”domain”) function so the theme could detect the translated string from the WPML String Translation component. So that the translation plugin would be compatible with BuddyPress’ BuddyPress Multilingual plugin, which allows BuddyPress sites to run fully multilingual using the WPML plugin, was used.

Commonly, other plugins use the String Translation function; __(“string to translate”,”domain”) , so it was easy to pick relevant domain of plugin and add translation for strings.

The GravityForms plugin was used on this site to build the main forms like “Contact Us”. So, “Gravity Forms Multilingual” component, which is known to work with WMPL was used to translate the forms by picking data from wp-admin > WPML > Language section.

Defined translations of deferent sections were required to be stored in database tables. These sections included:

  • Education Level
  • Featured Items
  • Subjects
  • Subject Areas
    .

Tables of the above mentioned sections have associated translated tables. So, the vteam #453 utilized WPML snippets and constants like ICL_LANGUAGE_CODE to implement customization. For example the use of  ICL_LANGUAGE_CODE is given as:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
if( defined('ICL_LANGUAGE_CODE') )
{
      $subjects_translated = cur_subjects_query(ICL_LANGUAGE_CODE);
}
function cur_subjects_query($current_language)
{
    $q_subjects = "
                    SELECT
                    subjects.subjectid as subjectid_orignal,
                    subjects.subject as subject,
                    subjects.displayname as displayname_orignal,
                    subjects_ml.subjectid as subjectid,
                    subjects_ml.displayname as displayname,
                    subjects_ml.language as language
                    FROM subjects
                    INNER JOIN subjects_ml
                    ON subjects.subjectid = subjects_ml.subjectid
                    WHERE subjects_ml.language = '$current_language'
                ORDER BY subjects.displayname asc
                    limit 1000
                  ";
    return $q_subjects;
}

 

  • Facebook
  • Twitter
  • Tumblr
  • Pinterest
  • Google+
  • LinkedIn
  • E-Mail

Comments are closed.

SEARCH BLOG

Categories

  • Blog (490)
  • Captain's Log (1)
  • Closure Reports (45)
  • Experiments (7)
  • How-To (56)
  • Implementation Notes (148)
  • Learn More (156)
  • LMS (8)
  • Look Inside (10)
  • Operations Log (12)
  • Programmer Notes (20)
  • R&D (14)
  • Rescue Log (4)
  • Testimonials (25)
  • Uncategorized (4)

RECENT STORIES

  • GitHub Actions- Automate your software workflows with excellence
  • Yii Framework – Accomplish Repetitive & Iterative Projects with Ease
  • A Recipe for CRM Software Development
  • Are Agile and DevOps the same?
  • The Data Scientist’s Toolset

ARCHIVES

In Short

With the vteams model, you bypass the middleman and hire your own offshore engineers - they work exclusively for you. You pay a reasonable monthly wage and get the job done without hassles, re-negotiations, feature counts or budget overruns.

Goals for 2020

  • Open development center in Australia
  • Complete and Launch the Robot
  • Structural changes to better address Clients' needs

Contact Us

Address: NEXTWERK INC.
6790 Embarcadero Ln, Ste 100,
Carlsbad, CA 92011, USA

Tel: (858) 586 7777
Email: fahad@nextwerk.com
Web: www.vteams.com

© 2020 vteams. All Rights Reserved.

Content Protection by DMCA.com