How to use i18next? Problems with translations

前端 未结 2 1836
萌比男神i
萌比男神i 2020-12-29 05:45

I want to use a internationalization option at my jQuery Mobile and jQuery webside. I tried to generate an example with the documentation on http://i18next.com but it seems

2条回答
  •  别那么骄傲
    2020-12-29 06:03

        
        
    
        
            Basic Sample Usage
    
               
              
        
    
        
    
            

    you can switch lng via ?setLng='lngTag'

    en |   de

    loaded via attribute 'data-i18n' and $('.nav').i18n();

    basic text
    extended usage of 'data-i18n' - apply to other attributes
    locales/en/ns.special.json <=> make same for de/ns.speacial.json { "nav": { "home": "en home", "1": "en link 1", "2": " en link 2" }, "btn": { "hoverMe": "en hover me!" } } and locales/de/ns.common.json <=> make same for en/ns.speacial.json { "app": { "company": { "name": "my company" } }, "attr": { "placeholder": "de translated placeholder", "title": "translated title" }, "add": "de add" }

提交回复
热议问题