Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

How to show content with html format and correct Language format? #92

Open
nazmulkp opened this issue Mar 1, 2019 · 5 comments
Open
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@nazmulkp
Copy link

nazmulkp commented Mar 1, 2019

I spend a lot of time show this content as a description but I am failed to manage this can anyone guide how can display it

`A'ishah said that the Messenger of Allah used to start the prayer by
reciting the Takbir (Allahu Akbar; Allah is Greatest)
and then recite,

                                                                                                                               الْحَمْدُ للَّهِ رَبِّ الْعَـلَمِينَ

All praise and thanks be to Allah, the Lord of all that exists. (Ibn Abi Hatim 1:2).

Above content coming from the API from a Nobel Book, I have no control about content, HTML tag, and Arabic.

Problem description:

I able to show text with HTML tag but Arabic content always set it left the position. it should be right according to Arabic language rule.


@oitan
Copy link

oitan commented Mar 2, 2019

I am not sure, since I did not check, but I guess the problem is that the constraints used to set text position are not leading/trailing anchor but left/right anchors. Leading and trailing anchors are language/region dependent, and left/right are not. You could check if I guessed right or not.

@nazmulkp
Copy link
Author

nazmulkp commented Mar 2, 2019

Thank you for your response. Yes! I tried with your suggestion and but no luck for me .

screen shot 2019-03-02 at 6 45 33 pm

        backgroundCornerRadiusView.addConstraint(NSLayoutConstraint(item: tafsirDetailsLabel, attribute: .trailing, relatedBy: .equal, toItem: backgroundCornerRadiusView, attribute: .trailing, multiplier: 1, constant: 0))
        backgroundCornerRadiusView.addConstraint(NSLayoutConstraint(item: tafsirDetailsLabel, attribute: .leading, relatedBy: .equal, toItem: backgroundCornerRadiusView, attribute: .leading, multiplier: 1, constant: 0))

if you want then I can give you a JSON file that is a single content based file.

@oitan
Copy link

oitan commented Mar 2, 2019

I cannot promise you anything, but let me try. Can you send the file?

@aelkady aelkady added bug Something isn't working help wanted Extra attention is needed labels Mar 4, 2019
@nazmulkp
Copy link
Author

nazmulkp commented Mar 6, 2019

Sorry for may delay here is my content that's . come from the server
https://docs.google.com/document/d/1cGcFCgJMaM8kTNbNpmZJC-udB2Z4EqTTgVhzSmL1L7E/edit?usp=sharing

@aelkady
Copy link
Contributor

aelkady commented May 13, 2019

@nazmulkp @oitan any updates on this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants