Is it possible to achieve string localization inside of a statically linked lib?

371 Views Asked by At

I am working on building an SDK which will be built out as a statically linked library that third party applications can then drop in to their applications. Inside of this SDK, I was looking to be able to perform some "localization." Basically, I would like for the code in my SDK to be able to access some ".string" files to perform some string lookup and language translation capabilities. Then I could propagate these strings outward to implementing App layers through my exposed API's. Is this even possible? I thought it was but now that I have actually been trying, I am seriously having doubts.

1

There are 1 best solutions below

4
On

You can make specific API to make the localized strings to be fed into the static library. One way for achieving it is by defining a predefined key value pair for all your library strings and ask end user to provide a localized files if a new language needs to be supported.