Skip to Content

How to distinguish between strings when English or Japanese via ABSL?

Dear All,

As the title,

How to distinguish between strings when English or Japanese via ABSL?

I tried to use regular expressions or ASCII values to judge, but none of them can be implemented.

Thanks and BR?

Jiang

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Oct 31, 2019 at 03:01 PM

    Jiang,

    Depending on the field you got the string from, there might be a 'languageCode' sub-field which you can use.

    Lewis

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 11, 2019 at 02:45 PM

    Hi @Eason,

    This is because user logged in English and maintained in JAPANESE or this field is maiteined via WS.

    So basically the language code is something cant be used now :(

    I am afraid you need to check if u can use some APIs which can detect languages.

    like : https://cloud.google.com/translate/docs/detecting-language

    Since it's a REST service you'll be able to integrate it without issues in your C4C using the SAP Cloud Application Studio.

    The documentation has an example like this one:

    https://translation.googleapis.com/language/translate/v2/detect?key=YOUR_API_KEY&q=Hallo Welt

    And the service will return something like:

    {"data":{"detections":[[{"language":"de","isReliable":false,"confidence":0.18397073}]]}}

    BR

    Dhruvin

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.