Hello dudes,

I'm new to Angular and normally a php developer. So dont hate me :).

I've a problem.

   - Created a Language dropdown switcher with nya-bs-select and tried to 
   translate the text of that Dropdown. But it fails :/

Thats my template (index.php)

<ol class="nya-bs-select" ng-model="selectedlanguage">
    <li data-value="de_DE" class="nya-bs-option">
        <a ng-click="setLang('de_DE')">
            <span><span class="flag-icon flag-icon-de"></span> {{ 
'load.partial.root.german' | translate }}</span>
        </a>
    </li>
    <li data-value="en_US" class="nya-bs-option">
        <a ng-click="setLang('en_US')">
            <span><span class="flag-icon flag-icon-gb"></span> {{ 
'load.partial.root.english' | translate }}</span>
        </a>
    </li>
</ol>


I'm loading the translations over partials


$translateProvider.useLoader('$translatePartialLoader', {
    urlTemplate: 'l10n/partial/{lang}.json'
});

// Tell the module what language to use by default
$translateProvider.preferredLanguage('de_DE');
// Tell the module to store the language in the cookies
$translateProvider.useCookieStorage();
$translatePartialLoaderProvider.addPart('root');
// Enable escaping of HTML
$translateProvider.useSanitizeValueStrategy('escape');


And my controller tells

$scope.selectedlanguage = $translate.proposedLanguage();

$scope.setLang = function(langKey) {
    $translate.use(langKey);
};


And now you see my Problem:

<http://i.imgur.com/mYxQuON.png>

Any idea?


Thank you


-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to