1
liomj
xlanguage and xoopsfaq problem
  • 2021/10/27 7:21

  • liomj

  • Just popping in

  • Posts: 77

  • Since: 2012/4/10


When using xlanguange tags eg [en]...[/en][ms]..[/ms] in the xoops faq, such as in categories and answers the [ ] tags is display instead of translating in frontend and backend

XOOPS FAQ 2.01 Alpha 1 (01/07/2020)
Xlanguage 3.1.3 RC-1 (08/18/2021)
XOOPS Version XOOPS 2.5.11-Beta2
PHP Version 7.4.24
MySQL Version 5.7.36

https://github.com/XoopsModules25x/xoopsfaq/issues/10

2
Mamba
Re: xlanguage and xoopsfaq problem
  • 2021/10/27 11:38

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


I've made some updates in my repository, but it seems like we are still having problems with xLanguage, i.e. sometimes you have to click on the flag in order to see the the language without the tags.

But check out the changes that I've made - when I click on the flag, it works on the front end.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

3
Mage
Re: xlanguage and xoopsfaq problem
  • 2021/10/29 7:56

  • Mage

  • Core Developer

  • Posts: 206

  • Since: 2009/8/2 1


Hello,

I don't know if it's related but the problem with xlanguage is that it processes the tags right before display. Let's imagine that the module makes a php break in the text (the php code takes the first 50 characters):

[en]My text of more than 50 characters [/en][fr]Mon texte de plus de 50 caractères [/fr]

It will transmit to xlanguage:

[en]My text of more than 50 characters...

And this is the beginning of the problems! He cannot close the tags!

To correct the problem, the module must clean the tags before processing the length of the text!

This is how I did for my modules:

https://github.com/GregMage/xmnews/commit/74fb8d951e7100f51162bcda2f3316070e95dfcb

for comment:

https://github.com/GregMage/xmnews/commit/350c02dda31018f8e5515e1a8941767889c36af3

If modules don't do this, they won't be able to work properly with xlanguage.

Today there are no other possible solutions...

4
liomj
Re: xlanguage and xoopsfaq problem
  • 2021/11/5 2:12

  • liomj

  • Just popping in

  • Posts: 77

  • Since: 2012/4/10


Thank you very much Mage and Mamba


the problem now fix so far with Mamba updates

5
Mamba
Re: xlanguage and xoopsfaq problem
  • 2021/11/5 3:17

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Awesome!!! I'm happy to hear it!!!
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

Login

Who's Online

235 user(s) are online (68 user(s) are browsing Support Forums)


Members: 0


Guests: 235


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits