Skip to content
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

Translation breaks in PDF-template #1034

Open
jmmeijer opened this issue Mar 2, 2024 · 3 comments · Fixed by #1035
Open

Translation breaks in PDF-template #1034

jmmeijer opened this issue Mar 2, 2024 · 3 comments · Fixed by #1035
Labels
Milestone

Comments

@jmmeijer
Copy link

jmmeijer commented Mar 2, 2024

Expected Behavior

Translation should be based on system setting

Current Behavior

Translation is reverted to English as default

Screenshots

Possible Solution

In file application/helpers/trans_helper.php
Replace line 37:
$current_language = 'english';
with:
$current_language = get_setting('default_language') ?? 'english';

Steps to Reproduce

Context (Environment)

In a PDF-template for an invoice the first strings will be properly translated, however after one point, (for an unknown reason) it will revert to English. After this, all other string will be English.

Detailed Description

Possible Implementation

Failure Logs

@nielsdrost7
Copy link
Contributor

Thanks for the Bug Report, man!
Solved in PR #1035
It's now merged into the develop branch.

Will be released with version 1.6.2

@jmmeijer
Copy link
Author

jmmeijer commented Mar 2, 2024

You're very welcome, It was my intention to provider more details on the cause, but to my surprise it was already merged into dev! You're fast, Niels!

@nielsdrost7
Copy link
Contributor

nielsdrost7 commented Mar 2, 2024

This one:

however after one point, (for an unknown reason) it will revert to English. After this, all other string will be English

Is an interesting one, let me look up an old issue :
#785
and #784

I think those 2 get very close to what you were experiencing.
I had 1 Sunday afternoon with those language troubles long long time ago (without xdebug). Gave me a headache.

If you re-experience the problem, just howler and we'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants