Skip to Content

SAPUI5 SmartField SmartFilterbar

hello,

we are using smartfields smartfilterbar etc a lot. but how is it possible to have the value-list dialog translated. It only appears in one language, normally germany here .

for definiend the annotations (short example) we do like this:

lo_property = lo_record->create_property( 'ValueListProperty' ).

lo_simp_value = lo_property->create_simple_value( ). l

lo_simp_value->set_string( 'Titel' ).

lo_record = lo_collection->create_record( iv_record_type = 'com.sap.vocabularies.Common.v1.ValueListParameterDisplayOnly' ).

lo_property = lo_record->create_property( 'ValueListProperty' ).

lo_simp_value = lo_property->create_simple_value( ).

lo_simp_value->set_string( 'Kostl' ).

so in german everything is ok, Kostl is on the screen as "Kostenstelle", in english e.g. i only see Kostl

the table of the valuelist has no column label in other languages than german.

also tried to use set_string_from_data_element - but no success.

does anybody has an idea what is wrong here or how to define that these things are always in the correct language.

regards

oliver

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 20, 2017 at 01:33 PM

    Hi Oliver,

    Your app will deal with language in different areas:

    1) Your browser has a default language set. So your app will draw field labels and any text defined on the i18n properties file. SAPUI5 components also have these files so that whenever you switch the browser language, each corresponding text is replaced with its internationalization accordingly. Suppose you switch the browser language or send (sap-language=en) parameter but the SmartFilter is still displaying in german. If this is the case, then I would recommend you you to upgrade the SAPUI5 libraries if possible or open an incident at SAP's support channels.

    2) Your OData service will also feature language dependent data. So, if the end-user has a master data record with a fixed language parameter, than any request to the OData provider system (ERP or FES) will follow this rule as well. It means your OData will bring the data from your backend in that language as well and will never change, regardless of the browser language settings. In FES, you need to check the trusted RFC to the ERP (the one used by FES when a user calls an OData service). If that RFC definition has a language definition, than that it is the case I mentioned as being "fixed". Please erase that language definition from the RFC. Otherwise, check if Master User Records (SU01) contains specific settings for each user you are using for testing. There is also another RFC defined (the one that contains user credentials). That is also used by the OData service to retrieve metadata from the ERP system. If that contains language, it will be the fixed case as well.

    Regards!
    Ivan

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Oliver,

      Please post this question again as the issue is different now. Remember to define more explicitly the UI5 component you are using.
      It helps a lot if you could provide a git repository with sample code where the issue can be reproduced.

      Regards,
      Ivan