-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Where to store translations – additional localtion? #35
Comments
We do not have the scenario at which editor / admins overwrite language in the live system but we do it on the local machine as developer. So can you provide more details on the scenario? |
I thought that was the purpose of the extension! |
To give editors power over translations / labels |
Legit. |
After all the languages have to be loaded by TYPO3. So simply saving them at an arbitrary location won't do much. Storing them in the database sounds nice too. In my opinion it should be sth. like this:
Yet there are a few things to be considered.
|
A little preamble: The thing with versioning and deployment workflows ist:
So it has become a best practice to take out TS from the "Info/Modify" module and include it from the code. I have a knack for workaroundish thinking. My idea was: what if TYPO3 would WRITE the complete XLF files ad hoc (on change) into the (somewhat ephemere, because it can be updated with a single click in the backend) So we would have a translation table:
There, you maybe have
etc. or handle the "elasticity" of languages with a json (one field for all translations). Just store it in the db as the final source. Whenever a value is changed, the xml files in the (unversioned) l10n folder is written fresh and cache is cleared) From where it is processed as usual. -> that's my idea. But: maybe you now say: why not just use a translation server ? That is already how that works! – If so, the reason is simply that I don't understand how that would work and how we could give editors access to translations via a server without spending a fortune. Maybe you can help me there? Then the use case for the extension could be reduced to what you initially stated (a developer tool) |
In general I have thoughts for some of the aspects you mention as well as agree overall, but I have no ideal solution. So I skip these thoughts. Things you could ask yourself and perhaps the customer:
While I am not a big fan of implementing a database table including domain model etc. just for one record it could be a solution to allow editors to maintain certain site-wide data. Doing it this way allows you to make use of the access management either. |
The location is correct, it's about labels and stuff. But they are translated and modified quite often. |
I'd prefer a separate folder on the filesystem as well and genuinely dislike the idea of writing them into the DB. On the other hand would the latter make it possible to have different translations on different page trees. Tempting 🤔 Our scenario is the following: admin users should be able to tweak the translation labels on production without having to bother the devs. The separate folder could be automatically version-controlled with a separate git repo by a cron job. |
To me it sounds like it will be quite some work with a separate git repository. Something you have to consider at least is that some changes may not be committed: |
@AMartinNo1, in my considerations it's a cronjob running only once a day. Like a backup kinda mechanism to prevent the backend users from accidentally deleting everything ;-) |
Both storage variants have their problems:
a) extension (you can run into trouble because you overwrite them by pushing)
b) l10n (you can run into trouble because you overwrite them either by
typo3cms language:update
or clicking in the backend.)-> what do you think about adding a third location? like l10n_custom? Do you think that would make any sense in regard to the above issues?
PS the robust solution would be to store the translations in the database (it's editor created content) and write the files in the third location automatically....
The text was updated successfully, but these errors were encountered: