{"id":26284601,"url":"https://github.com/onthegosystems/otgs-foo-user-fields","last_synced_at":"2025-06-25T02:07:58.046Z","repository":{"id":282281078,"uuid":"947963706","full_name":"OnTheGoSystems/otgs-foo-user-fields","owner":"OnTheGoSystems","description":"A WordPress plugin example to demonstrate the WPML String Package integration.","archived":false,"fork":false,"pushed_at":"2025-03-21T10:11:19.000Z","size":247,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-21T11:24:54.928Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OnTheGoSystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-13T14:25:46.000Z","updated_at":"2025-03-21T10:11:23.000Z","dependencies_parsed_at":"2025-03-13T18:53:39.856Z","dependency_job_id":null,"html_url":"https://github.com/OnTheGoSystems/otgs-foo-user-fields","commit_stats":null,"previous_names":["onthegosystems/otgs-foo-user-fields"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OnTheGoSystems/otgs-foo-user-fields","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnTheGoSystems%2Fotgs-foo-user-fields","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnTheGoSystems%2Fotgs-foo-user-fields/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnTheGoSystems%2Fotgs-foo-user-fields/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnTheGoSystems%2Fotgs-foo-user-fields/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OnTheGoSystems","download_url":"https://codeload.github.com/OnTheGoSystems/otgs-foo-user-fields/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnTheGoSystems%2Fotgs-foo-user-fields/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261789289,"owners_count":23209776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-14T18:36:34.804Z","updated_at":"2025-06-25T02:07:58.036Z","avatar_url":"https://github.com/OnTheGoSystems.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OTGS Foo User Fields\n\nThis an example of a WordPress plugin allowing to add custom user fields and display it on the author's page.\n\n**The purpose of this project is to demonstrate the integration with the [WPML String Packages](https://wpml.org/documentation/support/string-package-translation/).**\n\n## Before WPML integration\n\nWe can define some extra user fields:\n\n![](images/manage-fields.png)\n\nThen, each user can fill these extra fields in their profile:\n\n![](images/profile-screen.png)\n\nEventually, we can see these extra fields displayed on the author page:\n\n![](images/frontend-en.png)\n\n## After WPML integration\n\nWe can send the extra user fields to translation through the Translation Management Dashboard (1 package per user):\n\n![](images/tm-dashboard.png)\n\nAnd then translate it with the Advanced Translation Editor:\n\n![](images/ate-job.png)\n\nEventually, we can see the extra user fields translated on the frontend (author's page in the secondary language):\n\n![](images/frontend-fr.png)\n\n## Notes\n\n### Translating the field labels\n\nThe field labels are dynamic, it's defined by the site admin.\nBut we also need to have it translated on the frontend.\nTo keep the example simple, the field labels are using the same string package kind as the one used for the field values.\nTo prevent ID collisions with user entities, we are using a non-numerical package name `-- Labels --`.\n\n### Commits\n\nThere are 3 main commits, to follow the integration steps:\n- [compdev-683] Initial commit (the base plugin).\n- [compdev-683] Integrate user fields with WPML\n- [compdev-683] Extend the WPML integration to translate the field labels\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonthegosystems%2Fotgs-foo-user-fields","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonthegosystems%2Fotgs-foo-user-fields","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonthegosystems%2Fotgs-foo-user-fields/lists"}