Problem/Motivation
Split off from #2998539, which bundled S3 support and translation into a single ticket. This issue covers only translation so both concerns can be reviewed and released independently.
On path_file 2.1.1, path_file_entity is not translatable. Multilingual sites cannot maintain per-language values for name, path, or fid, and there is no /translations UI on the entity.
Steps to reproduce
N/A — feature request.
Proposed resolution
Mark the entity type as translatable (add translatable = TRUE, a data_table, and the content_translation handler in the annotation), and flag translatable base fields (name, path, fid) with setTranslatable(TRUE). Provide a hook_update_N to migrate existing schemas.
Remaining tasks
- Open a merge request against
2.1.x. - Add kernel/functional test coverage for translated entities.
- Verify on a multilingual site with the
content_translationmodule enabled. - Update README with a note about translation support.
User interface changes
Adds a "Translate" tab and per-language add/edit forms on each path_file_entity when content_translation is enabled.
API changes
None for existing consumers.
Data model changes
Adds a path_file_entity_field_data data table with a langcode column. Existing installs migrate via a hook_update_N.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | Screenshot From 2026-08-28 12-42-01.png | 97.43 KB | arjenk |
Issue fork path_file-3616156
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
batigolixHere is a first attempt for translating path files.
Comment #4
arjenk commentedThe concept is good, i could translate the file paths (after some work). Issues i found:
1. The update hook gives an error on existing content:
and if there is no content, it does not correctly convert the entity, and new file paths are not translatable.
I got it to work with this patch:
2. In getViewsData(), this is not correct anymore
This will result in 2 entries:

3. PathFileTranslationTest doesn't request the /nl/ version (minor)
The test does do a GET('path-file/' . $entity_id) but not the translation, i suggest adding:
$this->drupalGet('nl/path-file/' . $entity_id);