Browse Source

Merge pull request #3701 from Calinou/fix-vformat-example

Fix `vformat()` example in Common engine methods and macros
Rémi Verschelde 5 years ago
parent
commit
06b5afcc03
1 changed files with 2 additions and 1 deletions
  1. 2 1
      development/cpp/common_engine_methods_and_macros.rst

+ 2 - 1
development/cpp/common_engine_methods_and_macros.rst

@@ -89,7 +89,8 @@ To insert placeholders in localizable strings, wrap the localization macro in a
 
 
 .. code-block:: cpp
 .. code-block:: cpp
 
 
-    vformat(TTR("Couldn't open \"%s\" for reading."));
+    String file_path = "example.txt";
+    vformat(TTR("Couldn't open \"%s\" for reading."), file_path);
 
 
 .. note::
 .. note::