[CDB] gTranslate

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26870
Joined: Fri Aug 29, 2008 9:49 am

Re: [3.3][RC] gTranslate

Post by Mick »

ATM it’s not possible.
  • "The more connected we get the more alone we become” - Kyle Broflovski© 🇬🇧
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6795
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James

Re: [3.3][RC] gTranslate

Post by HiFiKabin »

as Mick says
Limitations: This extension packages the gTranslate code for easy use on phpBB so its operation is limited to how they have written that code.

The gTranslate code translates THE WHOLE PAGE, including Topics, Categories, Usernames etc.

Some spaces in the template are removed but this does not affect readability.

If you are using the board in a translated language not all of the Moderation Tools will function.

It sets the default language to that of your browser.
SeewolfPK
Registered User
Posts: 113
Joined: Sat Apr 09, 2011 10:18 am

Re: [3.3][RC] gTranslate

Post by SeewolfPK »

As I told you, default language of my browser not used and i must set my board to english as default language of the forum.
User language also english. Only than the translation works every time.
I switch now to the latest version 3.3.1 RC1.
On both testing boards translation start with German as default.
I try to set browser to english und visit my forum via Cyberghost with english IP.
Everytime it started in German.
I try to set Windows Language to english. It doesn´t help.

I can live with that, because the translation is wonderful for a new coming forum.
The most users will be german I think.
Best wishes
Paul
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6795
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James

Re: [3.3][RC] gTranslate

Post by HiFiKabin »

SeewolfPK wrote: Thu Jul 13, 2023 11:39 am The most users will be german I think.
... then why not just install the German Language pack?
SeewolfPK
Registered User
Posts: 113
Joined: Sat Apr 09, 2011 10:18 am

Re: [3.3][RC] gTranslate

Post by SeewolfPK »

HiFiKabin wrote: Thu Jul 13, 2023 12:16 pm
SeewolfPK wrote: Thu Jul 13, 2023 11:39 am The most users will be german I think.
... then why not just install the German Language pack?
I have install it and when I use it, translation did not work and I will use the translation.
i expect foreign users who want to write and read in their native language
and German users should then be able to read the foreign text in German
the extension only allows this if the board language and user language is english on my installed forum
Best wishes
Paul
User avatar
Miri4ever
Registered User
Posts: 618
Joined: Sat Mar 07, 2015 11:18 am

Re: [3.3][RC] gTranslate

Post by Miri4ever »

With mine, I use GERMAN Language means not be translated as I set up GERMAN as the default language for gTranslate.If you need both languages to be translated, it might get difficult, and you need to pick up a language you would rather not use for no translation. Also, be sure browser detect is off like:

Code: Select all

	"detect_browser_language": false,
	"wrapper_selector": ".gtranslate_wrapper",
      "default_language":"{{ TRANSLATE_DEFAULT_LANG |escape('js') }}",
Yes it will always display this language you chose for standard and it might confuse people. I found the way they create the country and flag names. So I started to try adding another new flag for no translate, but somehow my code is not working yet, or I did something complete wrong. It display after I put this code in a basic language just this undefined message inside the dropdown box:

Code: Select all

      function myFunction() {
          lang_array_english.push("zz":"No Translate");
          document.getElementById(".gtranslate_wrapper").innerHTML = lang_array_english;
                            }
          myFunction();
I might do wrong, or It's not as easy just adding another flag at the end of the array.

But you mention the usernames translated and there is no possible solution. Well, this is not totally true. I just did a success test, and it seems my usernames no longer translated with the no translation class. All you need to do is using the basic function that outputs usernames and add this no translate before the names. I am uncertain if I can this into my gTranslate Code. I think not have enough knowledge for yet. Writing a new extension for doing this with all usernames is another bad solution, the best things gTranslate could do it over:

Code: Select all

			'core.modify_username_string'				=> 'modify_username_string',
on its own. But I have done it for now with the Special Username Title Extension from DMZX, as it does all the needed steps for the username modification. I just added this no translate class at the main output and for now, it seems to work fine with no longer translated names. Sure it's a bad way to use a different extension for it, but I hope it can inspire how the code could be improved, and I might, include it and my working code with some longer trial and error, at my gTranslate with Admin Panel I still in use.
Homepage: Terra Oceanica

Extension Developments:
PHPBB Games Solitaire, MChat Poker, MChat Black Jack, MChat Cards, MChat Trivia
PHPBB Special Effects, Mousepointers, X-Mas Themes and Designs for PBWoW Style.
Supported work: (**New Updated** UCP Sidebar), Tables, Hide, PBWow3 Style
User avatar
Neverlands
Registered User
Posts: 118
Joined: Thu Sep 05, 2002 12:06 am
Location: Vienna / Austria

Re: [3.3][RC] gTranslate

Post by Neverlands »

Miri4ever wrote: Sun Jul 09, 2023 9:10 pm I found this solution for the problem now, I am satisfied with:

Use 3.30 RC3 Version and use the style files from 3.31 RC1

And then add this code from the old 3.30 RC to the new style:

Code: Select all

      "default_language":"{{ TRANSLATE_DEFAULT_LANG |escape('js') }}",
Now anybody can select his home language for the translator and this home language is not anymore translated. So your page's default language cannot be translated, and you can use several languages. But you need to old setup acp things back.

And if those BBCodes should be created we definitely need also an installer inside the extension.
Hello Miri4ever,

unfortunately this does not work for me.
I have set German as default browser and board language. Nevertheless, German is translated.

/ext/hifikabin/gtranslate/styles/all/template/event/overall_footer_after.html

Code: Select all

	"detect_browser_language": false,
	"wrapper_selector": ".gtranslate_wrapper",
	"default_language":"{{ TRANSLATE_DEFAULT_LANG |escape('js') }}",
	"languages":["de","en","fr","it"],
Update: Found out it works for me with

Code: Select all

	"detect_browser_language":false,
	"wrapper_selector": ".gtranslate_wrapper",
	"default_language":"de",
	"native_language_names":true,
	"languages":["de","en","fr","it","es"],
Last edited by Neverlands on Sat Jul 15, 2023 6:59 pm, edited 1 time in total.
User avatar
stone23
Registered User
Posts: 177
Joined: Sat Nov 02, 2019 4:44 pm
Location: France

Re: [3.3][RC] gTranslate

Post by stone23 »

You are all very nice but I would like you to specify in WHICH FILES you integrate all the codes that you mention because this subject becomes completely INCOMPREHENSIBLE and only confuses everyone !!!!

So I would like you to put your messages in order because for the moment, I don't understand anything about this!!!
encreuse.net
Forum version : 3.3.11
php version : 8.2.10

Excuse my English, I'm French...
mrix2000
Registered User
Posts: 1280
Joined: Sun Dec 03, 2006 2:23 pm

Re: [3.3][RC] gTranslate

Post by mrix2000 »

I have become a little lost also but hopefully things will iron themselves out over the coming weeks 8-)
User avatar
Neverlands
Registered User
Posts: 118
Joined: Thu Sep 05, 2002 12:06 am
Location: Vienna / Austria

Re: [3.3][RC] gTranslate

Post by Neverlands »

stone23 wrote: Sat Jul 15, 2023 5:15 pm You are all very nice but I would like you to specify in WHICH FILES you integrate all the codes that you mention because this subject becomes completely INCOMPREHENSIBLE and only confuses everyone !!!!

So I would like you to put your messages in order because for the moment, I don't understand anything about this!!!
I updated my post with the path to overall_footer_after.html :)
mrix2000
Registered User
Posts: 1280
Joined: Sun Dec 03, 2006 2:23 pm

Re: [3.3][RC] gTranslate

Post by mrix2000 »

Am I right in thinking some of you now have a working solution ?
If so could you please post what is required in simple terms ?
Thanks all
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6795
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James

Re: [3.3][RC] gTranslate

Post by HiFiKabin »

It all depends on what you call a working solution.

The extension works perfectly as it is, however if you want it not to translate unless you choose a language that is a different matter.

To do that

OPEN

hifikabin/gtranslate/styles/all/template/event/overall_footer_after.html

FIND

Code: Select all

	"detect_browser_language": true,
REPLACE WITH

Code: Select all

	"default_language":"en",
changing en to your preferred language

SAVE > UPLOAD > PURGE CACHE

HOWEVER this 'solution' has its own issues which includes not translating all of the posts on a page, as was reported with the earlier version.

You have to choose what problems are the lesser for your board.
mrix2000
Registered User
Posts: 1280
Joined: Sun Dec 03, 2006 2:23 pm

Re: [3.3][RC] gTranslate

Post by mrix2000 »

HiFiKabin wrote: Sun Jul 16, 2023 3:22 pm You have to choose what problems are the lesser for your board.
Hello and thanks for that work around, as you say it does not translate individual posts made in another language which is a shame :(
However its not translating my usernames which means the translate is now usable again :D 8-)
Did you hear anything back from the original developer about the possible solution you last made contact on ? or is this now it and its not likely anymore improvements can be made unless they make the changes their end ?
Huge thanks again for the help.
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6795
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James

Re: [3.3][RC] gTranslate

Post by HiFiKabin »

The free version of gTranslate is supplies as is and they have no plans to make any changes despite my suggestions. Apparently the paid for versions (>$10m-1) may have better options but there is no way I am investigating that.
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6795
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James

Re: [3.3] gTranslate

Post by HiFiKabin »

3.3.1 Validated on the CDB

Return to “Extensions in Development”