groue / GRMustache

Flexible and production-ready Mustache templates for MacOS Cocoa and iOS
http://mustache.github.com/
MIT License
1.44k stars 190 forks source link

Localize a variable key #85

Closed marwen-cherif closed 9 years ago

marwen-cherif commented 9 years ago

I'have some trouble to localize a variable key : i'have : "device.label.1" = "Phone1"; "device.label.2" = "Phone2";

i want to output my phone label in just a foreach on my device list. such as {{# localize}} device.label.{{id}} {{/ localize}}

what can i do ?

groue commented 9 years ago

Hi,

Your issue is not clear. Let's split it into several tiny pieces, so that it gets easier to grasp.

So please first write a template that is able to render your strings, non-localized. Once those values are correctly rendered, in a non-localized way, we'll be able to look into the localization process.

Come back when this task is done. If you have trouble achieving it, come back as well, but we will know that your problem is not a localization one.

groue commented 9 years ago

Could you fix your issue, @chrifmarwen? Si vous préférez, nous pouvons parler Français.