Traduction champ

8 years 11 months ago - 8 years 11 months ago #263196 by Mic_Mor
Traduction champ was created by Mic_Mor
bonjour,


J’essaye sans succès de traduire certains champs de cb. J'ai lu ci et là qui fallait passer par le fichier: cbteamplugins_language.php

par exemple dans mon cas, j'ai le champ suivant:

titre: langue
nom: cb_langue


dans le fichier, on trouve

<?php
/**
* Community Builder (TM) cbqueryfield French (France) language file Frontend
* @version $Id:$
* @copyright (C) 2004-2015 www.joomlapolis.com / Lightning MultiCom SA - and its licensors, all rights reserved
* @license www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU/GPL version 2
*/

/**
* WARNING:
* Do not make changes to this file as it will be over-written when you upgrade CB.
* To localize you need to create your own CB language plugin and make changes there.
*/

defined('CBLIB') or die();

return array(
// 54 language strings from file plug_cbqueryfield/cbqueryfield.xml
'FIELD_QUERY_VALIDATION_PREFERENCES_14b768' => 'Préférences de validation de la requête',

);

j'ai lu qu'il fallait ajouter dans celui-ci

'langue'=>'langue',

Où doit-on le mettre avant le ); final ? Doit-on employer langue ou cb_langue ?


Merci
The topic has been locked.
8 years 11 months ago - 8 years 11 months ago #263207 by Mic_Mor
Replied by Mic_Mor on topic Traduction champ
Je suis parvenu à le faire en ajoutant dans
language.php

'_UE_NiveauAdmin' ==> 'Administrateur', dans fr

'_UE_NiveauAdmin' ==> 'Administratie', dans nl


Maintenant, une autre question, peut-on utiliser la méthode expliquée ici : www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb pour traduire l'affichage.


[cb:if cb_rang_inscription2="5"] _UE_NiveauAdmin [/cb:if]

Pour qu'il affiche en fr, Administrateur et en NL Administratie ?

Je ne parviens pas à afficher la traduction, il m'affiche _UE_NiveauAdmin

Merci
The topic has been locked.
8 years 11 months ago #264155 by erilam
Replied by erilam on topic Traduction champ
A mon avis cela fonctionnera en mettant juste [value]

Eric Lamy (erix)
www.agerix.fr/
The topic has been locked.
8 years 11 months ago - 8 years 11 months ago #264159 by Mic_Mor
Replied by Mic_Mor on topic Traduction champ
bonjour et merci de ton aide.

quand tu parles de [value] c'est cela:

[cb:if cb_rang_inscription2="5"][ _UE_NiveauAdmin ][/cb:if]
[cb:if cb_rang_inscription2="5"][_UE_NiveauAdmin][/cb:if]

Il m'affiche toujours [ _UE_NiveauAdmin ] ou [_UE_NiveauAdmin]

Merci
The topic has been locked.
8 years 11 months ago #264237 by erilam
Replied by erilam on topic Traduction champ
Ce que je veux dire c'est qu'il n'est pas utile de faire une conditionnelle (cb:if) pour afficher une traduction, le système le gère tout seul.

Eric Lamy (erix)
www.agerix.fr/
The topic has been locked.
8 years 11 months ago #264238 by Mic_Mor
Replied by Mic_Mor on topic Traduction champ
ok mais comment le système fait-il le lien entre cb_rang_inscription2="5" et value ?

Je dois associer les deux champs, non ?


Merci
The topic has been locked.
Moderators: beatnantlavstephkrileonerilam
Time to create page: 0.320 seconds

Facebook Twitter LinkedIn