You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2011-01-25 15:53:38

marchino.cz
Member
Registered: 2011-01-25
Posts: 11

Notification template language specific condition

Hello experts,

I do not know how to create multi-language condition in notification template.

##IFtask.isprivate=Yes##

condition works well for English. What to do if GLPI system is in several languages. I use GLPI 0.78.1 in en, cs, nl and maybe other languages.

What if in menu Setup\General\Default values the Default language is set to English and users's language in menu Setting\Main\Select language is set to different language than English. Which language is then used in notification template condition?

Another question: As the condition is case sensitive (it means yes<>Yes), is there a way to use some constant for "yes" or "true" for example?

Thank for your help. Kind regards

Offline

#2 2011-01-25 21:40:45

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: Notification template language specific condition

##IFtask.isprivate## should be enough.

+


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#3 2011-01-26 15:23:14

marchino.cz
Member
Registered: 2011-01-25
Posts: 11

Re: Notification template language specific condition

This condition

##IFtask.isprivate##

is applied always, no matter task.isprivate=Yes or task.isprivate=No.  sad

I need condition that in case of private task writes text "sorry, private task" and using ELSE expression writes complete description of public tasks.

Offline

#4 2011-01-27 09:23:57

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: Notification template language specific condition

##IFtask.isprivate## means "if task.isprivate=yes"


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#5 2011-01-27 09:57:00

marchino.cz
Member
Registered: 2011-01-25
Posts: 11

Re: Notification template language specific condition

I test it in 0.78.1 version and the condition ##IFtask.isprivate## seems to mean "if task.isprivate<>null". I tested it once more for task.isprivate and followup.isprivate too.

If it runs for you, which version do you use?

Offline

Board footer

Powered by FluxBB