-
Notifications
You must be signed in to change notification settings - Fork 64
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
Error in DataTables localized output text (error introduced in MRBS version 1.11.3) (Solved) #3502
Comments
I think it actually works OK in 1.11.3, but not in the latest development code. The problem is that in the latest development code, which uses the latest DataTables library, there is only a sv-SE.json file. (In 1.11.3 and earlier, where the previous versions of DataTables used a different set of language files, there was a Swedish.lang file). In the short term you could fix your system by copying jquery/datatables/language/sv-SE.json to sv.json. As for the proper fix I think there are a number of options:
The last two options require a bit more thought though. |
I've raised an issue on the DataTables Plugins. |
The other workaround, assuming that at the moment you have |
I put $override_locale = 'sv-SE'; in the config.inc.php file without success. Should it be placed elsewhere? |
No, that's where it should go. I'm not sure whether you are running 1.11.3 or the latest development code. If you are running 1.11.3 I would recommend upgrading to the latest development code. You can download the files by following the green Code button on this page. Treat it like an upgrade. |
No, I misunderstood. It means you are in fact running 1.11.3. I recommend that you upgrade to the latest development code as described above. |
The not-translates terms resides in the files of this folder: mrbs/jquery/datatables/language/[Language].lang |
Have you upgraded to the latest development code? |
No, not yet. Maybe I'll try it tonight. Does it alter the sql-database so that I can not revert to the ordinary 1.11.3 release? |
No, it won't alter the database. Yes, I've tested it successfully with |
Strange things. I did install the dev. version, leaving the $override_locale = 'sv-SE'; as the only language pref. (Commented out $faqfilelang - $disable_automatic_language_changing - $default_language_tokens) |
After restarting the webserver (apache running on Synology) it worked. Thank you! |
But alas, after renaming the web folder containing the MRBS's web files - it's back to normal: All Swedish except the DataTables text, which still is English. |
Try doing a hard refresh of your browser, or else using a different browser. It's possible that your browser is using a cached version of the JavaScript file. |
New browser (that never have visited the site on beforehand) = no luck. Downgrading to MRBS 1.11.2 = huge success :-) It seems to me that this bug (failing to consistently show localized text elements in DataTables) was introduced in version 1.11.3 and still persists in det dev version. |
What are your settings of Also, what are your browser's language preferences (as shown on the MRBS Help page)? |
Can you try the attached version of js/datables.js.php with the latest development version? You'll need to unzip the file first. |
Hi, I've solved the "issue" of the demo site having an old version of MRBS, it is now running 1.11.3. This site is running the tip of the 'main' branch up until just now, when I pulled the latest code: |
I note that the demo site running 1.11.3 works properly when I have my browser language set to 'sv', but the tip doesn't (as I would expect). |
Tried your attached file. Still English titles above and below the table. |
Same result for me. One works, the other doesn't. |
…ch are copies of the main country specific version (eg fr.json is a copy of fr-FR.json). See GitHub Issue #3502.
I've now added in 56b28ca some basic language versions which should make the tip, when updated, work with 'sv'. |
Did you do a hard refresh of the browser? Can you have a look in your browser's development tools and see if there are any errors in (a) the console and (b) the network tabs? Also, if your site is on the internet and you are willing to give me a link, could you send me a PM? If not, I quite understand. |
Don't know if you had a chance to look at these? |
Campbell-m: I have sent you a message. |
OK, it hasn't arrived yet, but I'll look out for it. |
Now working. It seems that the problem was caused by not having the most up-to-date language.inc file on the web server. |
The top and the bottom of the table showing the result of a search is displayed in English, even though the MRBS is forced to show another language. The terms that are not translated are present in the lang.xx-file.
The error was not present in MRBS version 1.4.9, but occurs in 1.11.3.
Running:
10.3.37-MariaDB
Apache/2.4.57 (Unix)
PHP | 8.2.5
The text was updated successfully, but these errors were encountered: