Hi,
thanks for your description!
Language loading in WP-Table Reloaded is a bit tricky, because of the different kinds of language files involved.
The main translation for the admin area of the plugin is coming from “wp-content\plugins\wp-table-reloaded\languages”.
The decision on which file is loaded, is coming from the “Language” setting on the “Plugin Options” screen of WP-Table Reloaded.
The language data on the frontend (for DataTables) is coming from “wp-content\plugins\wp-table-reloaded\languages\datatables”. The decision on which file is loaded is however not coming from that setting on the “Plugin Options” screen, but from the setting for “WP_LANG” in your wp-config.php.
So, to find out if everything is correct here, please answer the following:
What is the value of the “WP_LANG” constant in your wp-config.php file?
What is the setting of the Language dropdown on the “Plugin Options” screen?
(Btw: Replacing the en_US.txt with your version will of course work, but there’s a nicer solution as well, which I can tell you after I know the answers to the questions above.)
Regards,
Tobias
Thread Starter
Rhama
(@rhama)
thanks for your response Tobias.
Here’s my answers:
1. What is the value of the “WP_LANG” constant in your wp-config.php file?
>>> I use international WordPress version, in English of course.
2. What is the setting of the Language dropdown on the “Plugin Options” screen?
>>> I choose Indonesian (id_ID)
Yes, I know exactly what you mean by two questions above. If I use WordPress in Indonesian version the problem solved, but unfortunately Indonesian version is too slow for updating core 😀
and the only way is by tweaking the plugin. good to know you have nicer solution then 😉
Hi,
thanks for your answers. That definitely explains why you see the English translation for DataTables in the frontend.
As I mentioned, changing it is easy though.
Just add the following code the “functions.php” in your theme. This tells WordPress and WP-Table Reloaded to use the Indonesian translation for DataTables:
add_filter( 'wp_table_reloaded_datatables_locale', 'change_wp_table_reloaded_datatables_locale' );
function change_wp_table_reloaded_datatables_locale( $locale ) {
return 'id_ID';
}
With that code in place, you will never again have to replace the lang-en_US.txt file.
Best wishes,
Tobias
Thread Starter
Rhama
(@rhama)
ah! you’re cool! never thought to use that trick! 😀
by the way, this is also the problem for the images (asc.gif, bg.gif & desc.gif). for table header using light background color, black images is okay. but, how if I set up the background in dark one? so, once again I need to replacing the three images with my own white. could you add more feature in next version to solve this problem?
and one more thing. I want to make some corrections for Bahasa Indonesia translation for your plugin, where can I send it?
thanks again TObias.
Hi,
thanks for the confirmation, that this works.
Changing the images of the arrows is already possible through “Custom CSS”. All you need to do is upload your modified images to your server, e.g. in your theme folder and then take the CSS for the table head background (I believe it is in the datatables.css file), adjust it and paste that into the “Custom CSS” textfield.
Regarding the translation: Please send me an email (the address is in the main file “wp-table-reloaded.php”), and I will get you in touch with the current translator for Bahasa Indonesian, so that you can discuss your translation suggestion with him. Would that be ok?
Best wishes,
Tobias
Thread Starter
Rhama
(@rhama)
once again, you’re cool! I forgot to use Custom CSS as well hahaha
allright then, I’ll send the files to your email. Many thanks!