Tag Archives: glotpress

GP Limit Import Strings Number

GlotCore Limit Import Strings Number extends GlotPress by adding the ability to define a maximum number of strings that can be imported from a translation file.

It gives you better control over project size and helps protect your server from performance issues caused by very large imports.


Why Use This Plugin?

Large translation files can:

  • Slow down your server during import
  • Consume excessive memory
  • Affect overall GlotPress performance
  • Overload shared or limited hosting environments

By setting a clear limit on the number of importable strings, you ensure stability and predictable resource usage.


Use Cases

This plugin is especially useful when:

  • You want to protect your GlotPress instance from heavy imports
  • You run GlotPress on shared hosting
  • You offer translation services with usage tiers (e.g., free plan with limited strings)
  • You want to allow small personal projects but restrict large-scale imports

How It Works

After installation, the plugin automatically limits imports to 1000 strings by default.

You can easily change the limit by adding the following constant to your wp-config.php file:

define( 'GLOTCORE_IMPORT_STRINGS_LIMIT', 500 );

Replace 500 with any number that fits your needs.


Key Features

  • Simple and lightweight
  • Configurable via wp-config.php
  • Helps maintain performance and stability
  • Ideal for free-tier or limited plans

Repository: https://github.com/meloniq/gp-limit-import-strings-number

GlotCore REST API for GlotPress

GlotCore REST API is a WordPress plugin that extends GlotPress by exposing a REST API for programmatic access to translation data. It enables developers to integrate GlotPress with external systems, automate localization workflows, and build custom applications on top of the GlotPress platform.

The plugin follows WordPress REST API conventions and introduces a versioned API namespace to ensure clarity and future evolution.

Purpose and Scope

GlotCore REST API extends GlotPress by providing a versioned, RESTful interface for both retrieving and managing translation-related data programmatically. The plugin enables external systems and custom applications to interact with GlotPress using standard HTTP methods, without relying on internal or UI-bound APIs.

Unlike read-only integrations, GlotCore REST API exposes endpoints that support full lifecycle operations on selected resources, including:

  • Creating, updating, and deleting projects
  • Managing translation sets and translations
  • Creating and maintaining glossaries and glossary entries
  • Managing project permissions
  • Accessing user profile information

This makes it possible to treat GlotPress as a headless translation platform, suitable for automation, synchronization, and integration scenarios.

Typical use cases include:

  • Automating project and translation set provisioning
  • Integrating GlotPress with CI/CD and localization pipelines
  • Synchronizing translation data with external services
  • Building custom administrative interfaces or dashboards
  • Managing glossaries and terminology programmatically
  • Extending GlotPress behavior using stable, public endpoints

Experimental Status

GlotCore REST API is currently in an experimental phase.

  • The API is functional but still evolving
  • Endpoints and response formats may change
  • Versions between 0.1 and 1.0 do not guarantee backward compatibility

The plugin is intended for developers who are comfortable working with evolving APIs and providing feedback.

API Overview

All endpoints are available under the versioned namespace:

/gp/v0.1

The API provides both read and write access (where applicable) to core GlotPress resources, enabling full programmatic interaction with translation data and configuration.

Available Endpoints

Base

  • /gp/v0.1
    Base endpoint providing API availability and metadata.

Formats

  • /gp/v0.1/formats
    Retrieve available file formats.

Glossaries

  • /gp/v0.1/glossaries
    Retrieve and create glossaries.
  • /gp/v0.1/glossaries/{id}
    Retrieve, update, or delete a specific glossary.
  • /gp/v0.1/glossaries/{id}/entries
    Retrieve and create glossary entries.
  • /gp/v0.1/glossaries/{id}/entries/{entry_id}
    Retrieve, update, or delete a specific glossary entry.

Languages

  • /gp/v0.1/languages
    Retrieve available languages.

Originals

  • /gp/v0.1/originals
    Retrieve original strings.
  • /gp/v0.1/originals/{id}
    Retrieve or delete a specific original string.

Projects

  • /gp/v0.1/projects
    Retrieve and create projects.
  • /gp/v0.1/projects/{id}
    Retrieve, update, or delete a specific project.
  • /gp/v0.1/projects/{id}/permissions
    Retrieve and create project permissions.
  • /gp/v0.1/projects/{id}/permissions/{permission_id}
    Retrieve or delete a specific project permission.

Translations

  • /gp/v0.1/translations
    Retrieve and create translations.
  • /gp/v0.1/translations/{id}
    Retrieve, update, or delete a specific translation.

Translation Sets

  • /gp/v0.1/translation-sets
    Retrieve and create translation sets.
  • /gp/v0.1/translation-sets/{id}
    Retrieve, update, or delete a specific translation set.

User Profiles

  • /gp/v0.1/profile/me
    Retrieve the authenticated user profile.
  • /gp/v0.1/profile/{id}
    Retrieve a specific user profile.

Authentication

Some endpoints require authentication.

For development and testing, the recommended approach is to use the WordPress Application Passwords with Basic Authentication.

This allows secure access without additional plugins or custom authentication layers.

Tooling and Exploration

To simplify API exploration and testing:

  • A Postman collection is included
  • A Postman environment file is provided
  • Endpoints can be tested immediately after installation

This makes it easy to inspect responses, understand available fields, and prototype integrations.

Configuration

No additional configuration is required.

After installing and activating the plugin, the REST API endpoints become available automatically.

Intended Audience

GlotCore REST API is designed primarily for:

  • WordPress and GlotPress developers
  • Plugin and integration authors
  • Teams building automation around translation workflows
  • Organizations using GlotPress as part of a larger localization system

Future Direction

Version 0.1 establishes the foundation for a public GlotPress REST API. Future iterations may expand endpoint coverage, and work toward long-term API stability.


Repository: https://github.com/meloniq/glotcore-rest-api

GP Restrict Subscribers Suggest

GlotPress plugin to restrict subscribers from suggesting translations.

If a subscriber has additional permissions — for example, if they are a validator for a specific locale — they will still be able to add translations for that locale, but not for others.

This applies to situations where your site has users with subscriber roles for other purposes, such as receiving newsletters, posting comments, or purchasing products, and you simply don’t want them to have the ability to interfere with GlotPress, the translations system.

Repository: https://github.com/meloniq/gp-restrict-subscribers-suggest

GP Translation Updater

Plugin extends WordPress updates mechanism, and when WordPress checks for a plugins or themes updates, the Updater also check for that updates in configured custom GlotPress instance, and let’s the WordPress knows when an update is available.

Extra headers:

GlotPress API URI: this is the URL to our GlotPress, eg: https://glotpress.local/

GlotPress API Path: this is the path to our project, eg: appthemes/clipper/2.0.x

Plugin: add extra headers to main plugin file, eg. wp-plugin.php

/*
Plugin Name: My Plugin
Version: 1.2.3
GlotPress API URI: https://glotpress.local/
GlotPress API Path: mycompany/myplugin/1.2.x
*/

Theme: add extra headers to style.css

/*
Theme Name: My Theme
Version: 2.5.0
GlotPress API URI: https://glotpress.local/
GlotPress API Path: mycompany/mytheme/2.x
*/