You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@syncope.apache.org by Tech <te...@psynd.net> on 2017/01/18 12:40:25 UTC

Label on custom attributes

Dear all,

we need to create custom attributes in Syncope, but we realized the
correspondence 1:1 with Key/Column/Label.

For example we might need to display some attributes that should not be
read necessary in English and that could contain accents.

For example we imagine something like this:


firstname: {

    "lang":"en" {

        "value":"Name"

    },

    "lang":"fr": {

        "value":"Pr�nom"

    }

}


In this case we could keep a stick reference for the name, in our case
"firstname", but after display in a different way (and language) and
being able to implement also accents: is there a way to do it?

Thanks!


Re: Label on custom attributes

Posted by Tech <te...@psynd.net>.
Excellent, thank you!




On 18/01/2017 17:24, Francesco Chicchiricc� wrote:
> On 18/01/2017 13:44, Francesco Chicchiricc� wrote:
>> On 18/01/2017 13:40, Tech wrote:
>>>
>>> Dear all,
>>>
>>> we need to create custom attributes in Syncope, but we realized the
>>> correspondence 1:1 with Key/Column/Label.
>>>
>>> For example we might need to display some attributes that should not
>>> be read necessary in English and that could contain accents.
>>>
>>> For example we imagine something like this:
>>>
>>>
>>> firstname: {
>>>
>>>     "lang":"en" {
>>>
>>>         "value":"Name"
>>>
>>>     },
>>>
>>>     "lang":"fr": {
>>>
>>>         "value":"Pr�nom"
>>>
>>>     }
>>>
>>> }
>>>
>>>
>>> In this case we could keep a stick reference for the name, in our
>>> case "firstname", but after display in a different way (and
>>> language) and being able to implement also accents: is there a way
>>> to do it?
>>>
>>
>> The EndUser UI already provides translation features: take a look at
>> the JSON files available under
>>
>> enduser/src/main/webapp/app/languages/
>>
>> You have a directory for each language available, and two files in
>> each directory: 'static.json' for application messages and
>> 'dynamic.json' for labels (including attributes).
>
> I have added this information (and a bit more) to the reference guide:
>
> https://ci.apache.org/projects/syncope/reference-guide.html#customization-enduser-translations
>
> Regards.
> -- 
> Francesco Chicchiricc�
>
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
>
> Member at The Apache Software Foundation
> Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
> http://home.apache.org/~ilgrosso/



Re: Label on custom attributes

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 18/01/2017 13:44, Francesco Chicchiricc� wrote:
> On 18/01/2017 13:40, Tech wrote:
>>
>> Dear all,
>>
>> we need to create custom attributes in Syncope, but we realized the 
>> correspondence 1:1 with Key/Column/Label.
>>
>> For example we might need to display some attributes that should not 
>> be read necessary in English and that could contain accents.
>>
>> For example we imagine something like this:
>>
>>
>> firstname: {
>>
>>     "lang":"en" {
>>
>>         "value":"Name"
>>
>>     },
>>
>>     "lang":"fr": {
>>
>>         "value":"Pr�nom"
>>
>>     }
>>
>> }
>>
>>
>> In this case we could keep a stick reference for the name, in our 
>> case "firstname", but after display in a different way (and language) 
>> and being able to implement also accents: is there a way to do it?
>>
>
> The EndUser UI already provides translation features: take a look at 
> the JSON files available under
>
> enduser/src/main/webapp/app/languages/
>
> You have a directory for each language available, and two files in 
> each directory: 'static.json' for application messages and 
> 'dynamic.json' for labels (including attributes).

I have added this information (and a bit more) to the reference guide:

https://ci.apache.org/projects/syncope/reference-guide.html#customization-enduser-translations

Regards.

-- 
Francesco Chicchiricc�

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/


Re: Label on custom attributes

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 18/01/2017 13:40, Tech wrote:
>
> Dear all,
>
> we need to create custom attributes in Syncope, but we realized the 
> correspondence 1:1 with Key/Column/Label.
>
> For example we might need to display some attributes that should not 
> be read necessary in English and that could contain accents.
>
> For example we imagine something like this:
>
>
> firstname: {
>
>     "lang":"en" {
>
>         "value":"Name"
>
>     },
>
>     "lang":"fr": {
>
>         "value":"Pr�nom"
>
>     }
>
> }
>
>
> In this case we could keep a stick reference for the name, in our case 
> "firstname", but after display in a different way (and language) and 
> being able to implement also accents: is there a way to do it?
>

The EndUser UI already provides translation features: take a look at the 
JSON files available under

enduser/src/main/webapp/app/languages/

You have a directory for each language available, and two files in each 
directory: 'static.json' for application messages and 'dynamic.json' for 
labels (including attributes).

HTH
Regards.

-- 
Francesco Chicchiricc�

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/