4

I'm trying to add placeholders in my string templates for Arabic, but I'm having a hard time making it work.

For example, I have this English version: "shortcut.reminder.mins" = "You will be notified in %d minutes";

When converting this to Arabic, injecting the %d in the string breaks the string in the editor. Here is what it should look like replacing the variable with underscores: "shortcut.reminder.mins" = "سيتم إعلامك خلال _____ دقيقة";

However, trying to replace the underscores with the intended %d, it breaks the sentence because I'm trying to inject a left-to-right phrase in a right-to-left sentence: "shortcut.reminder.mins" = "سيتم إعلامك خلال %d دقيقة";

Is there a language-specific placeholder I'm supposed to use, or do I always use English placeholders in the localized string? How do I not break the sentence by mixing right/left languages?

TruMan1
  • 33,665
  • 59
  • 184
  • 335
  • Can you have a look at these links https://stackoverflow.com/questions/5031315/c-sharp-localization-problems-with-mixing-of-left-to-right-words-with-right-to?rq=1 https://stackoverflow.com/questions/7172297/string-format-problem-in-concatenating-left-to-right-languages-with-right-to-lef?rq=1 https://stackoverflow.com/questions/15207486/right-to-left-languages-and-programming-problems?rq=1 – Smith Aug 07 '18 at 00:46

0 Answers0