How to Use Crowdin Android SDK #283
ronnieotieno
started this conversation in
General
Replies: 1 comment
-
Hi @ronnieotieno! The Crowdin Android SDK relies on the local Please also refer to our Example project to see the SDK in action on a real project. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In our project, we use a single file called translation_keys, where we define all the keys for our app, corresponding to ones in the crowdin. We use custom views to set the keys or get the strings programatically from the key, and based on the key and the user's language, we fetch the appropriate translation from our local database (and occasionally load updated translations from Crowdin).
Our setup does not include traditional localization files like strings.xml for en, ar, de, etc., with keys defined there.
So far I have tried to create a string.xml with the keys as in the crowdin and set them to our views thinking that the crowdin would get localisation and that doesnt seem to work. How do you guys go about it? The documentation isnt as in depth i would say.
In the Application class on oncreate:
In our Base Activity:
override fun getDelegate() = BaseContextWrappingDelegate(super.getDelegate())
In strings.xml:
<string name="testing_crowdin_distribution">Testing</string>
Corresponding to the key
testing_crowdin_distribution
in the crowdin with stringTesting Crowdin Distribution
In the Layout:
The Textview doesn't get strings from the Crowdin.
I followed the documentation on here
When logging the manifest I am able to see the contents which corresponds to all our locale as in in crowdin
Any guidance or best practices would be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions